Erreur d'insertion SQL Error Code: 1072. Key column 'aptinscription_id' doesn't exist in table
Bonjour à tous
J'ai un problème à l'insertion du sql.
voilà mon schema.yml:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
aptevenement:
columns:
titre_evenement: string
desciption: string
lieu: string
date_evenement: date
date_cloture_inscriptions: date
nb_joueurs_max: integer
image_fond_confirmation: string
relations:
aptinscription:
foreignAlias: Evenement
aptinscription:
columns:
nom:
type: string
notnull: true
prenom:
type: string
notnull: true
pseudo:
type: string
notnull: false
date_naissance:
type: date
notnull: true
email:
type: string
notnull: true
ville:
type: string
notnull: true
code_securite:
type: string
notnull: true
aptetatreservation_id:
type: integer
notnull: true
aptevenement_id:
type: integer
notnull: true
aptetatreservation:
columns:
libelle:
type: string
notnull: true
relations:
aptinscription:
foreignAlias: EtatReservation |
Je ne pense pas avoir fait d'erreur en le créant.
Il me génère ce sql: (après un cc et un build-model)
Code:
1 2 3 4 5 6
|
CREATE TABLE aptetatreservation (id BIGINT AUTO_INCREMENT, libelle TEXT NOT NULL, INDEX aptinscription_id_idx (aptinscription_id), PRIMARY KEY(id)) ENGINE = INNODB;
CREATE TABLE aptevenement (id BIGINT AUTO_INCREMENT, titre_evenement TEXT, desciption TEXT, lieu TEXT, date_evenement DATE, date_cloture_inscriptions DATE, nb_joueurs_max BIGINT, image_fond_confirmation TEXT, INDEX aptinscription_id_idx (aptinscription_id), PRIMARY KEY(id)) ENGINE = INNODB;
CREATE TABLE aptinscription (id BIGINT AUTO_INCREMENT, nom TEXT NOT NULL, prenom TEXT NOT NULL, pseudo TEXT, date_naissance DATE NOT NULL, email TEXT NOT NULL, ville TEXT NOT NULL, code_securite TEXT NOT NULL, aptetatreservation_id BIGINT NOT NULL, aptevenement_id BIGINT NOT NULL, PRIMARY KEY(id)) ENGINE = INNODB; |
et quand j'exécute ce sql dans mon Mysql j'obtiens l'erreur:
Code:
1 2
|
Error Code: 1072. Key column 'aptinscription_id' doesn't exist in table |
ça fait 3/4h que je cherche mon erreur, je ne la vois pas :( si quelqu'un la voit , ou a un conseil à me donner je suis preneur ;)
merci d'avance