schema.yml wyglada tak:
JobeetCategory: actAs: Timestampable: ~ I18n: fields: [name] actAs: Sluggable: { fields: [name], uniqueBy: [lang, name] } columns: name: { type: string(255), notnull: true } JobeetJob: actAs: { Timestampable: ~ } columns: category_id: { type: integer, notnull: true } type: { type: string(255) } company: { type: string(255), notnull: true } logo: { type: string(255) } url: { type: string(255) } position: { type: string(255), notnull: true } location: { type: string(255), notnull: true } description: { type: string(4000), notnull: true } how_to_apply: { type: string(4000), notnull: true } token: { type: string(255), notnull: true, unique: true } is_public: { type: boolean, notnull: true, default: 1 } is_activated: { type: boolean, notnull: true, default: 0 } email: { type: string(255), notnull: true } expires_at: { type: timestamp, notnull: true } relations: JobeetCategory: { onDelete: CASCADE, local: category_id, foreign: id, foreignAlias: JobeetJobs } JobeetAffiliate: actAs: { Timestampable: ~ } columns: url: { type: string(255), notnull: true } email: { type: string(255), notnull: true, unique: true } token: { type: string(255), notnull: true } is_active: { type: boolean, notnull: true, default: 0 } relations: JobeetCategories: class: JobeetCategory refClass: JobeetCategoryAffiliate local: affiliate_id foreign: category_id foreignAlias: JobeetAffiliates JobeetCategoryAffiliate: columns: category_id: { type: integer, primary: true } affiliate_id: { type: integer, primary: true } relations: JobeetCategory: { onDelete: CASCADE, local: category_id, foreign: id } JobeetAffiliate: { onDelete: CASCADE, local: affiliate_id, foreign: id } sfGuardUserProfile: tableName: sf_guard_user_profile columns: id: type: integer(4) primary: true autoincrement: true user_id: type: integer(4) notnull: true email: type: string(80) fullname: type: string(80) validate: type: string(17) relations: User: class: sfGuardUser foreign: id local: user_id type: one onDelete: cascade foreignType: one foreignAlias: Profile
laduje mi sie to wszystko
php symfony doctrine:build --all --and-load --no-confirmation
i na koncu;
Kod
>> doctrine generating sql for models
>> doctrine Generated SQL successfully for models
>> doctrine creating tables
SQLSTATE[HY000]: General error: 1005 Can't create table 'jobeet.#sql-510_1d' (
errno: 150). Failing Query: "ALTER TABLE sf_guard_user_profile ADD CONSTRAINT sf
_guard_user_profile_user_id_sf_guard_user_id FOREIGN KEY (user_id) REFERENCES sf
_guard_user(id) ON DELETE CASCADE". Failing Query: ALTER TABLE sf_guard_user_pro
file ADD CONSTRAINT sf_guard_user_profile_user_id_sf_guard_user_id FOREIGN KEY (
user_id) REFERENCES sf_guard_user(id) ON DELETE CASCADE
>> doctrine Generated SQL successfully for models
>> doctrine creating tables
SQLSTATE[HY000]: General error: 1005 Can't create table 'jobeet.#sql-510_1d' (
errno: 150). Failing Query: "ALTER TABLE sf_guard_user_profile ADD CONSTRAINT sf
_guard_user_profile_user_id_sf_guard_user_id FOREIGN KEY (user_id) REFERENCES sf
_guard_user(id) ON DELETE CASCADE". Failing Query: ALTER TABLE sf_guard_user_pro
file ADD CONSTRAINT sf_guard_user_profile_user_id_sf_guard_user_id FOREIGN KEY (
user_id) REFERENCES sf_guard_user(id) ON DELETE CASCADE
nie bardzo rozumiem o co tutaj chodzi...
pozdrawiam