Sha256: eb565f1b5721c94f8e1bc32e52ceabbb94142f815383c92b0d1a54c0f607ede3
Contents?: true
Size: 976 Bytes
Versions: 18
Compression:
Stored size: 976 Bytes
Contents
module Hanami class CLI module Commands module Db # @since 1.1.0 # @api private class Migrate < Command requires "model.sql" desc "Migrate the database" argument :version, desc: "The target version of the migration (see `hanami db version`)" example [ " # Migrate to the last version", "#{Project.migration_timestamp} # Migrate to a specific version" ] # @since 1.1.0 # @api private def call(version: nil, **options) context = Context.new(version: version, options: options) migrate_database(context) end private # @since 1.1.0 # @api private def migrate_database(context) require "hanami/model/migrator" Hanami::Model::Migrator.migrate(version: context.version) end end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems