search for: constraint_nam

Displaying 3 results from an estimated 3 matches for "constraint_nam".

Did you mean: constraint_name
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_airports.rb: require "migration_helpers&quo...
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
2009 Sep 28
5
Multi-databases support
Hi, While I was hacking ovirt-server, I have found that it's currently restricted to Postgres DB. Even if I like postgres for serious work on a server, I really prefer to hack/dev locally on a Sqlite or MySQL DB. I have googled on rails in order to find a good answer for the "foreign key problem" which forces OVirt to stay on pg. I have found a plugin on this particular