Sha256: aab423b1e180698fddb985cd2151004cf31216a4f067a812a2ae91bae2823a46

Contents?: true

Size: 626 Bytes

Versions: 7

Compression:

Stored size: 626 Bytes

Contents

require 'eucalypt/eucalypt-migration/namespaces/migration-drop/generators/table'
require 'eucalypt/app'
require 'eucalypt/errors'
require 'eucalypt/helpers'

module Eucalypt
  class MigrationDrop < Thor
    include Eucalypt::Helpers
    using Colorize
    desc "table [NAME]", "Removes a table".colorize(:grey)
    def table(name)
      directory = File.expand_path('.')
      if Eucalypt.app? directory
        migration = Eucalypt::Generators::Drop::Table.new
        migration.destination_root = directory
        migration.generate(name: name)
      else
        Eucalypt::Error.wrong_directory
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
eucalypt-0.2.2 lib/eucalypt/eucalypt-migration/namespaces/migration-drop/cli/drop-table.rb
eucalypt-0.2.1 lib/eucalypt/eucalypt-migration/namespaces/migration-drop/cli/drop-table.rb
eucalypt-0.2.0 lib/eucalypt/eucalypt-migration/namespaces/migration-drop/cli/drop-table.rb
eucalypt-0.1.3 lib/eucalypt/eucalypt-migration/namespaces/migration-drop/cli/drop-table.rb
eucalypt-0.1.2 lib/eucalypt/eucalypt-migration/namespaces/migration-drop/cli/drop-table.rb
eucalypt-0.1.1 lib/eucalypt/eucalypt-migration/namespaces/migration-drop/cli/drop-table.rb
eucalypt-0.1.0 lib/eucalypt/eucalypt-migration/namespaces/migration-drop/cli/drop-table.rb