Displaying 3 results from an estimated 3 matches for "from_tabl".
Did you mean:
from_table
2010 Nov 09
2
Undefined method
I am very new to ROR. (Ruby 1.8.7, rails 2.1.1, rack
0.8.7, mysql 5.1.41)
I has my_app/lib/migration_helpers.rb file:
module MigrationHelpers
def self.foreign_key(from_table, from_column, to_table)
constraint_name = "fk_#{from_table}_#{to_table}"
execute %{alter table #{from_table}
add constraint #{constraint_name}
foreign key (#{from_column})
references #{to_table}(id)
}....
end
In my_app/db/migrate/001_create_airpo...
2009 Sep 28
5
Multi-databases support
...nd a good answer for the "foreign
key problem" which forces OVirt to stay on pg. I have found a plugin on
this particular problem, named foreigner :
http://github.com/matthuhiggins/foreigner
It provides a rails' syntax to common operation on them. For instance :
add_foreign_key(from_table, to_table, options)
remove_foreign_key(from_table, options)
foreign_keys(table_name)
I really like to keep my development computer to run as fast as possible
(ie without a database service), so I have even tried to integrate this
plugin into OVirt, in a transparent way for existing db.
A...
2008 Jul 04
4
Libs directory
Hello,
I had an application on Rails 1.2 or 1.1 (don''t remember). Now I have
updated it to 2.1.
I had a migrations_helper.rb in the Libs directory which defined
foreign_key and drop_foreign_key methods. But now migrate task doesn''t
find them. Have I to include this directory somewhere with Rails 2.1?
Doesn''t it work as always?
Could I use another thing to declare