Sha256: a8e486f317a262d2d8f2500f2bcce6ff46eb44ff32b9e42956f1897ca712ab90

Contents?: true

Size: 661 Bytes

Versions: 15

Compression:

Stored size: 661 Bytes

Contents

module Hanami
  class CLI
    module Commands
      # @since 1.1.0
      # @api private
      module Db
        class Drop < Command
          requires "model.configuration"

          desc "Drop the database (only for development/test)"

          # @since 1.1.0
          # @api private
          def call(**options)
            context = Context.new(options: options)

            drop_database(context)
          end

          private

          # @since 1.1.0
          # @api private
          def drop_database(*)
            require "hanami/model/migrator"
            Hanami::Model::Migrator.drop
          end
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
hanami-1.3.5 lib/hanami/cli/commands/db/drop.rb
hanami-1.3.4 lib/hanami/cli/commands/db/drop.rb
hanami-1.3.3 lib/hanami/cli/commands/db/drop.rb
hanami-1.3.2 lib/hanami/cli/commands/db/drop.rb
hanami-1.3.1 lib/hanami/cli/commands/db/drop.rb
hanami-1.3.0 lib/hanami/cli/commands/db/drop.rb
hanami-1.3.0.beta1 lib/hanami/cli/commands/db/drop.rb
hanami-1.2.0 lib/hanami/cli/commands/db/drop.rb
hanami-1.2.0.rc2 lib/hanami/cli/commands/db/drop.rb
hanami-1.2.0.rc1 lib/hanami/cli/commands/db/drop.rb
hanami-1.2.0.beta2 lib/hanami/cli/commands/db/drop.rb
hanami-1.2.0.beta1 lib/hanami/cli/commands/db/drop.rb
hanami-1.1.1 lib/hanami/cli/commands/db/drop.rb
hanami-1.1.0 lib/hanami/cli/commands/db/drop.rb
hanami-1.1.0.rc1 lib/hanami/cli/commands/db/drop.rb