Module: DBNazi::AbstractAdapter::Adapter
- Defined in:
- lib/db_nazi/abstract_adapter.rb
Instance Method Summary collapse
- #add_column(table_name, column_name, type, options = {}) ⇒ Object
- #add_index(table_name, column_name, options = {}) ⇒ Object
- #change_column(table_name, column_name, type, options = {}) ⇒ Object
- #change_column_default(table_name, column_name, default) ⇒ Object
- #create_table(name) ⇒ Object
Instance Method Details
#add_column(table_name, column_name, type, options = {}) ⇒ Object
17 18 19 20 |
# File 'lib/db_nazi/abstract_adapter.rb', line 17 def add_column(table_name, column_name, type, = {}) DBNazi.check_column(type, ) super end |
#add_index(table_name, column_name, options = {}) ⇒ Object
22 23 24 25 |
# File 'lib/db_nazi/abstract_adapter.rb', line 22 def add_index(table_name, column_name, = {}) DBNazi.check_index() super end |
#change_column(table_name, column_name, type, options = {}) ⇒ Object
27 28 29 30 |
# File 'lib/db_nazi/abstract_adapter.rb', line 27 def change_column(table_name, column_name, type, = {}) DBNazi.check_column(type, ) super end |
#change_column_default(table_name, column_name, default) ⇒ Object
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/db_nazi/abstract_adapter.rb', line 32 def change_column_default(table_name, column_name, default) original_nullability = DBNazi.require_nullability begin DBNazi.require_nullability = false return_val = super ensure DBNazi.require_nullability = original_nullability return_val end end |