Class: Spider::Migrations::DropTable
- Inherits:
-
IrreversibleMigration
- Object
- Migration
- IrreversibleMigration
- Spider::Migrations::DropTable
- Defined in:
- lib/spiderfw/model/migrations/drop_table.rb
Instance Method Summary collapse
-
#initialize(model, options = {}) ⇒ DropTable
constructor
A new instance of DropTable.
- #run ⇒ Object
Methods inherited from IrreversibleMigration
Constructor Details
#initialize(model, options = {}) ⇒ DropTable
Returns a new instance of DropTable.
5 6 7 8 |
# File 'lib/spiderfw/model/migrations/drop_table.rb', line 5 def initialize(model, ={}) @model = model @options = end |
Instance Method Details
#run ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/spiderfw/model/migrations/drop_table.rb', line 10 def run table = @options[:table_name] if !table table = @model.mapper.schema.table.name end @model.mapper.storage.drop_table(table) end |