List:General Discussion« Previous MessageNext Message »
From:Johan De Meersman Date:May 18 2010 4:55pm
Subject:Re: Foreign Key Problem
View as plain text  
On Tue, May 18, 2010 at 6:00 PM, Victor Subervi <victorsubervi@stripped>wrote:

>
>
> So apparently it didn't like my foreign key. Do I need to do something with
> the table I'm referencing or what?
> TIA.
>

Well, quickfix is to convert your tables to innoDB, starting with the
lowest-level (foreign-key only ones) first - I'm not sure what happens if
you set a referential constraint from an innodb table to a myisam table.

You can easily convert tables with "alter table *yourtable* engine=innodb;".
For the tables where you also want to add constraints and/or indices, "alter
table *yourtable* add constraint *yourconstrainthere* engine=innodb;" does
the trick in one go.


-- 
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel

Thread
Foreign Key ProblemVictor Subervi18 May
  • Re: Foreign Key ProblemJohan De Meersman18 May
    • Re: Foreign Key ProblemVictor Subervi18 May
      • Re: Foreign Key ProblemJohan De Meersman18 May
        • Re: Foreign Key ProblemShawn Green18 May
          • Re: Foreign Key ProblemVictor Subervi18 May
            • Re: Foreign Key ProblemShawn Green18 May
              • Re: Foreign Key ProblemVictor Subervi19 May
                • Re: Foreign Key ProblemShawn Green19 May
                  • Re: Foreign Key ProblemVictor Subervi19 May
                    • Re: Foreign Key ProblemShawn Green19 May
                      • Re: Foreign Key ProblemVictor Subervi20 May
                        • Re: Foreign Key ProblemVictor Subervi22 May