Class: Ardb::Adapter::Mysql
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#==, #create_db, #drop_db, #drop_tables, #initialize, #load_schema
Constructor Details
This class inherits a constructor from Ardb::Adapter::Base
Instance Method Details
#foreign_key_add_sql ⇒ Object
8 9 10 11 12 13 |
# File 'lib/ardb/adapter/mysql.rb', line 8 def foreign_key_add_sql "ALTER TABLE :from_table"\ " ADD CONSTRAINT :name"\ " FOREIGN KEY (:from_column)"\ " REFERENCES :to_table (:to_column)" end |
#foreign_key_drop_sql ⇒ Object
15 16 17 18 |
# File 'lib/ardb/adapter/mysql.rb', line 15 def foreign_key_drop_sql "ALTER TABLE :from_table"\ " DROP FOREIGN KEY :name" end |