Class: DbDiff::Delta::AddView
- Inherits:
-
DbDiff::Delta
- Object
- DbDiff::Delta
- DbDiff::Delta::AddView
- Defined in:
- lib/dbdiff/delta.rb
Instance Attribute Summary
Attributes inherited from DbDiff::Delta
Instance Method Summary collapse
Methods inherited from DbDiff::Delta
Constructor Details
This class inherits a constructor from DbDiff::Delta
Instance Method Details
#process(database) ⇒ Object
271 272 273 |
# File 'lib/dbdiff/delta.rb', line 271 def process(database) database.views << element end |
#sql ⇒ Object
267 268 269 |
# File 'lib/dbdiff/delta.rb', line 267 def sql return "CREATE VIEW `%s` AS (%s)" % [element.name,element.definition] end |