Sha256: 5eda703acf41c9875f683b341218fb4e1569e37d74203543b17a0294549dcfbd
Contents?: true
Size: 723 Bytes
Versions: 11
Compression:
Stored size: 723 Bytes
Contents
# frozen_string_literal: true require_relative "../../app/command" module Hanami module CLI module Commands module App module DB # @api private class Version < App::Command desc "Print schema version" option :target, desc: "Target migration number", aliases: ["-t"] # @api private def call(target: nil, **) # rubocop:disable Lint/UnusedMethodArgument migration = database.applied_migrations.last version = migration ? File.basename(migration, ".*") : "not available" out.puts "=> current schema version is #{version}" end end end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems