If integer(4) have another error:
SQLSTATE[HY000]: General error: 1005 Can't create table
'ranks.#sql-3a5_b1c' (errno: 150). Failing Query: ALTER TABLE
rank_domain ADD CONSTRAINT rank_domain_user_id_sf_guard_user_id
FOREIGN KEY (user_id) REFERENCES sf_guard_user(id). Failing Query:
ALTER TABLE
Could you paste your RankDomain fixtures? the problem may be there
On Wed, Aug 18, 2010 at 3:12 AM, RusAlex interpret...@gmail.com wrote:
IT's a standart fixtures:
sfGuardUser:
User_admin:
first_name: John
last_name: Doe
email_address: john@gmail.com
username:
It seems that you forgot the relations indentation.
It must be:
RankDomain:
columns:
name: { type: string(255), notnull: true, unique: true }
user_id: { type: integer, notnull:true }
relations:
sfGuardUser: { local: user_id, foreign: id }
On Aug 17, 7:33 am, RusAlex
No im sorry i have mistake in pasting. I have a correct relations
RankDomain:
columns:
name: { type: string(255), notnull: true, unique: true }
user_id: { type: integer, notnull:true }
relations:
sfGuardUser: { local: user_id, foreign: id }
but error still exist
On Aug 17, 11:44
Could paste the fixture?
On 08/17/2010 12:50 PM, RusAlex wrote:
No im sorry i have mistake in pasting. I have a correct relations
RankDomain:
columns:
name: { type: string(255), notnull: true, unique: true }
user_id: { type: integer, notnull:true }
relations:
sfGuardUser:
try changing the type attribute of the foreignKey user_id under
RankDomain to type: integer(4)
i.e
RankDomain:
columns:
name: { type: string(255), notnull: true, unique: true }
user_id: { type: integer(4), notnull:true }
relations:
sfGuardUser: { local: user_id, foreign: id }