Export to GitHub

cakephp-migrations - issue #7

Foreign keys as PK?


Posted on Mar 25, 2008 by Quick Bear

What steps will reproduce the problem?

Using descrition such as...

users: group: fkey

or

users: fkey: group

What is the expected output? What do you see instead?

Error as FK pretend to be a PK: CREATE TABLE users (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, group_id_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, username VARCHAR(64) NOT NULL, passwd VARCHAR(64) NOT NULL, email VARCHAR(255) NOT NULL, active TINYINT(1) DEFAULT NULL, registration_token VARCHAR(64) NOT NULL, registration_expires DATETIME NOT NULL, created DATETIME DEFAULT NULL, modified DATETIME DEFAULT NULL)

Comment #1

Posted on May 13, 2008 by Grumpy Ox

Please paste the full migration YAML?

Comment #2

Posted on Aug 21, 2008 by Grumpy Ox

(No comment was entered for this change.)

Status: WorksForMe

Labels:
Type-Defect Priority-Medium