Sha256: 80c7819b512572727c414da0bb071606448ecabf2be1a52b22be2f692abede67

Contents?: true

Size: 661 Bytes

Versions: 3

Compression:

Stored size: 661 Bytes

Contents

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

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

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

            drop_database(context)
          end

          private

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hanami-1.1.0.beta3 lib/hanami/cli/commands/db/drop.rb
hanami-1.1.0.beta2 lib/hanami/cli/commands/db/drop.rb
hanami-1.1.0.beta1 lib/hanami/cli/commands/db/drop.rb