[Nitro] Problem with forgien key constraints
rob
rob at motionpath.com
Sat Feb 18 06:38:21 EST 2006
It isn't really important what the constraint names are as you can
examine the constraint definitions to see what should and shouldn't
be there, I tried to give them descriptive names in the same vein as
the join table naming system (for people who care to meddle with the
database manually) but it's not necessary, they could be named anything.
Nice idea.
On 18 Feb 2006, at 02:55, itsme213 wrote:
>
>
>> The new patch that alters join table names has highlighted a problem
>> with the foreign key constraints system. The problem is PostgreSQL
>> doesn't like very long constraint names.
>
> Standard library abbrev seems to give short unambiguous name prefixes.
>
> irb(main):003:0> require 'abbrev'
> => true
> irb(main):004:0> ['abc', 'abcde', 'pqr'].abbrev
> => {"pq"=>"pqr", "abc"=>"abc", "p"=>"pqr", "pqr"=>"pqr",
> "abcd"=>"abcde",
> "abcde"=>"abcde"}
> irb(main):005:0>
>
> Would that help?
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
More information about the Nitro-general
mailing list