Sha256: 63b5bd6d65081101d5a6bbcd716e2ddc1034e7e12b0a14354c984f5418b62777

Contents?: true

Size: 599 Bytes

Versions: 16

Compression:

Stored size: 599 Bytes

Contents

# frozen_string_literal: true

module Miteru
  module Commands
    module Database
      class << self
        def included(thor)
          thor.class_eval do
            include Concerns::DatabaseConnectable

            desc "migrate", "Migrate DB schemas"
            around :with_db_connection
            method_option :verbose, type: :boolean, default: true
            def migrate(direction = "up")
              ActiveRecord::Migration.verbose = options["verbose"]
              Miteru::Database.migrate direction.to_sym
            end
          end
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
miteru-3.0.0 lib/miteru/commands/database.rb
miteru-2.4.0 lib/miteru/commands/database.rb
miteru-2.3.2 lib/miteru/commands/database.rb
miteru-2.3.1 lib/miteru/commands/database.rb
miteru-2.3.0 lib/miteru/commands/database.rb
miteru-2.2.4 lib/miteru/commands/database.rb
miteru-2.2.3 lib/miteru/commands/database.rb
miteru-2.2.2 lib/miteru/commands/database.rb
miteru-2.2.1 lib/miteru/commands/database.rb
miteru-2.2.0 lib/miteru/commands/database.rb
miteru-2.1.1 lib/miteru/commands/database.rb
miteru-2.1.0 lib/miteru/commands/database.rb
miteru-2.0.3 lib/miteru/commands/database.rb
miteru-2.0.2 lib/miteru/commands/database.rb
miteru-2.0.1 lib/miteru/commands/database.rb
miteru-2.0.0 lib/miteru/commands/database.rb