Class: BazaMigrations::Commands::DropTable
- Defined in:
- lib/baza_migrations/commands/drop_table.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #changed_rollback_sql ⇒ Object
-
#initialize(name) ⇒ DropTable
constructor
A new instance of DropTable.
- #sql ⇒ Object
Methods inherited from Base
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_sql ⇒ Object
10 11 12 |
# File 'lib/baza_migrations/commands/drop_table.rb', line 10 def changed_rollback_sql raise BazaMigrations::Errors::IrreversibleMigration end |
#sql ⇒ Object
6 7 8 |
# File 'lib/baza_migrations/commands/drop_table.rb', line 6 def sql ["DROP TABLE `#{@name}`"] end |