Class: BazaMigrations::Commands::DropTable

Inherits:
Base
  • Object
show all
Defined in:
lib/baza_migrations/commands/drop_table.rb

Instance Attribute Summary

Attributes inherited from Base

#db, #table

Instance Method Summary collapse

Methods inherited from Base

#default_args

Constructor Details

#initialize(name) ⇒ DropTable

Returns a new instance of DropTable.



2
3
4
# File 'lib/baza_migrations/commands/drop_table.rb', line 2

def initialize(name)
  @name = name
end

Instance Method Details

#changed_rollback_sqlObject



10
11
12
# File 'lib/baza_migrations/commands/drop_table.rb', line 10

def changed_rollback_sql
  raise BazaMigrations::Errors::IrreversibleMigration
end

#sqlObject



6
7
8
# File 'lib/baza_migrations/commands/drop_table.rb', line 6

def sql
  ["DROP TABLE `#{@name}`"]
end