Module: Spider::Migrations
- Defined in:
- lib/spiderfw/model/migrations.rb,
lib/spiderfw/model/migrations/replace.rb,
lib/spiderfw/model/migrations/migration.rb,
lib/spiderfw/model/migrations/drop_table.rb,
lib/spiderfw/model/migrations/drop_element.rb,
lib/spiderfw/model/migrations/previous_model.rb,
lib/spiderfw/model/migrations/rename_element.rb,
lib/spiderfw/model/migrations/irreversible_migration.rb
Defined Under Namespace
Modules: PreviousModel
Classes: DropElement, DropTable, IrreversibleMigration, Migration, RenameElement, Replace
Class Method Summary
collapse
Class Method Details
.drop_element!(model, element, options = {}) ⇒ Object
17
18
19
|
# File 'lib/spiderfw/model/migrations.rb', line 17
def self.drop_element!(model, element, options={})
Spider::Migrations::DropElement.new(model, element, options={})
end
|
.drop_table!(model, options = {}) ⇒ Object
21
22
23
|
# File 'lib/spiderfw/model/migrations.rb', line 21
def self.drop_table!(model, options={})
Spider::Migrations::DropTable.new(model, options={})
end
|
.previous_model(model, previous = nil) ⇒ Object
29
30
31
32
33
34
|
# File 'lib/spiderfw/model/migrations.rb', line 29
def self.previous_model(model, previous=nil)
model.send(:include, PreviousModel)
if previous
model.previous_model_of(previous)
end
end
|
.rename_element(model, element, new_element, options = {}) ⇒ Object
25
26
27
|
# File 'lib/spiderfw/model/migrations.rb', line 25
def self.rename_element(model, element, new_element, options={})
RenameElement.new(model, element, new_element, options={})
end
|
.replace(model, element, values) ⇒ Object
13
14
15
|
# File 'lib/spiderfw/model/migrations.rb', line 13
def self.replace(model, element, values)
Spider::Migrations::Replace.new(model, element, values)
end
|