Új hozzászólás Aktív témák

  • PumpkinSeed
    addikt

    Nem lehet, h a kódban a FK létrehozása előrébb van, mint a products tábláé (PK) ?

    Egy eset ugyan ilyen hibakódra (1005 / 150):

    LATEST FOREIGN KEY ERROR
    ------------------------
    100509 20:59:49 Error in foreign key constraint of table foo/#sql-12c_4:
    FOREIGN KEY (car_id) REFERENCES Cars (car_id):
    Cannot find an index in the referenced table where the
    referenced columns appear as the first columns, or column types
    in the table and the referenced table do not match for constraint.
    Note that the internal storage type of ENUM and SET changed in
    tables created with >= InnoDB-4.1.12, and such columns in old tables
    cannot be referenced by such columns in new tables.
    See http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html
    for correct foreign key definition.

    Nem lehetséges, mert már kész táblákról van szó. Esetleg az, hogy a location_log tábla törölve volt, és újra létrehozva majd most, hogy változtatni akarok a recycle_bin (vagy mi van itt) beleszól a változtatásba?

Új hozzászólás Aktív témák