Sha256: 08f89439786825a9a59fbcb034e5eea3f86c87c3bcabc9ffc95a876745f8daf1

Contents?: true

Size: 664 Bytes

Versions: 22

Compression:

Stored size: 664 Bytes

Contents

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

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

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
eucalypt-0.3.1 lib/eucalypt/migration/namespaces/migration-drop/cli/drop-column.rb
eucalypt-0.3.0 lib/eucalypt/migration/namespaces/migration-drop/cli/drop-column.rb