Bonjour,

j'ai un problème avec mon schema Yml, généré par le plugin Doctrine Export de MySqlWorkbench et modifié à la main pour la gestion de l'internationalisation.
En effectuant la tâche build:doctrine --all --and-load j'ai le problème suivant:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
SQLSTATE[42000]: Syntax error or access violation: 1072 Key column 'photos_id' doesn't exist in table. Failing Query: "ALTER TABLE photos_translation ADD CONSTRAINT photos_translation_photos_id_photos_photos_id FOREIGN KEY (photos_id) REFERENCES photos(photos_id) ON UPDATE CASCADE ON DELETE CASCADE". Failing Query: ALTER TABLE photos_translation ADD CONSTRAINT photos_translation_photos_id_photos_photos_id FOREIGN KEY (photos_id) REFERENCES photos(photos_id) ON UPDATE CASCADE ON DELETE CASCADE
Je vous cite mon schema yml:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
---
detect_relations: true
options:
  collate: utf8_general_ci
  charset: utf8
  type: InnoDB
 
Articles:
  connection: doctrine
  actAs:
    Timestampable: ~
    I18n:
      fields:      [articles_titre, articles_resume, articles_description, articles_meta_title, articles_meta_description, articles_meta_tag, deleted]
      actAs:
        Sluggable: { fields: [ articles_titre ], uniqueBy: [ lang, articles_titre ] }      
  columns:
    id:
      type: integer(4)
      primary: true
      notnull: true
      autoincrement: true
    articles_active:
      type: enum
      values: ['Y','N']
      notnull: true
      default: 'N'
    articles_type:
      type: string(50)
    articles_vignette:
      type: string(50)
      default: null
    position:
      type: integer(4)
      notnull: true
      default: 1
    articles_id:
      type: integer(4)
      primary: true
      notnull: true
    articles_titre:
      type: string(255)
      notnull: true
    articles_resume:
      type: string(255)
    articles_description:
      type: clob(65535)
    articles_meta_title:
      type: string(255)
    articles_meta_description:
      type: string(255)
    articles_meta_tag:
      type: string(255)
    deleted:
      type: enum
      values: ['Y','N']
      notnull: true
      default: 'N'
  options:
    charset: utf8
    collate: utf8_general_ci
 
Activites:
  connection: doctrine
  actAs:
    Timestampable: ~
    I18n:
      fields: [ activites_nom, activites_resume, activites_description, activites_meta_title, activites_meta_description, activites_meta_tag, deleted]
      actAs:  
        Sluggable: { fields: [ activites_nom ], uniqueBy: [ lang, activites_nom ] }
  columns:
    id:
      type: integer(4)
      primary: true
      notnull: true
      autoincrement: true
    activites_active:
      type: enum
      values: ['Y','N']
      notnull: true
    activites_vignette:
      type: string(50)
      default: null
    position:
      type: integer(4)
      notnull: true
      default: 1
    activites_id:
      type: integer(4)
      primary: true
      notnull: true
    activites_nom:
      type: string(255)
      notnull: true
    activites_resume:
      type: string(255)
    activites_description:
      type: clob(65535)
    activites_meta_title:
      type: string(255)
    activites_meta_description:
      type: string(255)
    activites_meta_tag:
      type: string(255)
    deleted:
      type: enum
      values: ['Y','N']
      notnull: true
      default: 'N'
  options:
    charset: utf8
    collate: utf8_general_ci
 
Regions:
  connection: doctrine
  actAs:
    Timestampable: ~
    I18n:
      fields: [regions_nom, regions_resume, regions_description, regions_meta_title, regions_meta_description, regions_meta_tag, deleted]
      actAs:
        Sluggable: { fields: [ regions_nom ], uniqueBy: [ lang, regions_nom ] }
  columns:
    id:
      type: integer(4)
      primary: true
      notnull: true
      autoincrement: true
    regions_parent:
      type: integer(4)
      default: null
    regions_active:
      type: enum
      values: ['Y','N']
      notnull: true
      default: 'N'
    regions_vignette:
      type: string(50)
      default: null
    position:
      type: integer(4)
      notnull: true
      default: 1
    regions_id:
      type: integer(4)
      primary: true
      notnull: true
    regions_nom:
      type: string(255)
    regions_resume:
      type: string(255)
    regions_description:
      type: clob(65535)
    regions_meta_title:
      type: string(255)
    regions_meta_description:
      type: string(255)
    regions_meta_tag:
      type: string(255)
    deleted:
      type: enum
      values: ['Y','N']
      notnull: true
      default: 'N'
  relations:
    region:
      class: Region
      local: regions_parent
      foreign: regions_id
      foreignAlias: regions
      onDelete: set null
      onUpdate: set null
  indexes:
    fk_regions_regions_parent:
      fields: [regions_parent]
  options:
    charset: utf8
    collate: utf8_general_ci
 
ActiviteInRegion:
  connection: doctrine
  actAs:
    Timestampable: ~
    I18n:
      fields: [activite_nom, activite_resume, activite_contact, activite_adresse, activite_description, activite_meta_title, activite_meta_description, activite_meta_tag, deleted]
      actAs:
        Sluggable: { fields: [ activite_nom ], uniqueBy: [ lang, activite_nom ] }
  columns:
    id:
      type: integer(4)
      primary: true
      notnull: true
      autoincrement: true
    activites_id:
      type: integer(4)
      notnull: true
    regions_id:
      type: integer(4)
      notnull: true
    activite_active:
      type: enum
      values: ['Y','N']
      notnull: true
      default: 'N'
    activite_latitude:
      type: string(50)
    activite_longtitude:
      type: string(50)
    activite_vignette:
      type: string(50)
      default: null
    position:
      type: integer(4)
      notnull: true
      default: 1
    activite_in_region_id:
      type: integer(4)
      primary: true
      notnull: true
    activite_nom:
      type: string(255)
      notnull: true
    activite_resume:
      type: string(255)
    activite_contact:
      type: string(255)
    activite_adresse:
      type: string(255)
    activite_description:
      type: clob(65535)
    activite_meta_title:
      type: string(255)
    activite_meta_description:
      type: string(255)
    activite_meta_tag:
      type: string(255)
    deleted:
      type: enum
      values: ['Y','N']
      notnull: true
      default: 'N'
  relations:
    activite:
      class: Activite
      local: activites_id
      foreign: activites_id
      foreignAlias: activiteInRegions
      onDelete: cascade
      onUpdate: cascade
      foreignType: many
      owningSide: true
    region:
      class: Region
      local: regions_id
      foreign: regions_id
      foreignAlias: activiteInRegions
      onDelete: cascade
      onUpdate: cascade
  indexes:
    fk_ar_activites_id:
      fields: [activites_id]
    fk_ar_regions_id:
      fields: [regions_id]
  options:
    charset: utf8
    collate: utf8_general_ci
 
Evenements:
  connection: doctrine
  actAs:
    Timestampable: ~
    I18n:
      fields: [evenements_nom, evenements_resume, evenements_description, evenements_meta_title, evenements_meta_description, evenements_meta_tag, deleted]
      actAs:
        Sluggable: { fields: [ evenements_nom ], uniqueBy: [ lang, evenements_nom ] }
  columns:
    id:
      type: integer(4)
      primary: true
      notnull: true
      autoincrement: true
    evenements_active:
      type: enum
      values: ['Y','N']
      notnull: true
      default: 'N'
    evenements_vignette:
      type: string(50)
    position:
      type: integer(4)
      notnull: true
      default: 1
    evenements_id:
      type: integer(4)
      primary: true
      notnull: true
    evenements_nom:
      type: string(255)
      notnull: true
    evenements_resume:
      type: string(255)
    evenements_description:
      type: clob(65535)
    evenements_meta_title:
      type: string(255)
    evenements_meta_description:
      type: string(255)
    evenements_meta_tag:
      type: string(255)
    deleted:
      type: enum
      values: ['Y','N']
      notnull: true
      default: 'N'
  options:
    charset: utf8
    collate: utf8_general_ci
 
EvenementInRegion:
  connection: doctrine
  tableName: evenement_in_region
  actAs:
    Timestampable: ~
    I18n:
      fields: [ evenement_nom, evenement_lieu, evenement_resume, evenement_description, evenement_meta_title, evenement_meta_description, evenement_meta_tag, deleted]
      actAs:
        Sluggable: { fields: [ evenement_nom ], uniqueBy: [ lang, evenement_nom ] }
  columns:
    id:
      type: integer(4)
      primary: true
      notnull: true
      autoincrement: true
    evenements_id:
      type: integer(4)
      notnull: true
    regions_id:
      type: integer(4)
      notnull: true
    evenement_active:
      type: enum
      values: ['Y','N']
      notnull: true
      default: 'N'
    evenement_dated:
      type: string(50)
    evenement_datef:
      type: string(50)
    evenement_longtitude:
      type: string(50)
    evenement_latitude:
      type: string(50)
    evenement_vignette:
      type: string(50)
      default: null
    position:
      type: integer(4)
      notnull: true
      default: 1
    evenement_in_region_id:
      type: integer(4)
      primary: true
      notnull: true
    evenement_nom:
      type: string(255)
      notnull: true
    evenement_lieu:
      type: string(45)
    evenement_resume:
      type: string(255)
    evenement_description:
      type: clob(65535)
    evenement_meta_title:
      type: string(255)
    evenement_meta_description:
      type: string(255)
    evenement_meta_tag:
      type: string(255)
    deleted:
      type: enum
      values: ['Y','N']
      notnull: true
  relations:
    evenement:
      class: Evenement
      local: evenements_id
      foreign: evenements_id
      foreignAlias: evenementInRegions
      onDelete: cascade
      onUpdate: cascade
    region:
      class: Region
      local: regions_id
      foreign: regions_id
      foreignAlias: evenementInRegions
      onDelete: cascade
      onUpdate: cascade
  indexes:
    fk_er_evenements_id:
      fields: [evenements_id]
    fk_er_regions_id:
      fields: [regions_id]
  options:
    charset: utf8
    collate: utf8_general_ci
 
Tags:
  connection: doctrine
  tableName: tags
  columns:
    id:
      type: integer(4)
      primary: true
      notnull: true
      autoincrement: true
    tags_libelle:
      type: string(150)
      notnull: true
    tags_compteur:
      type: integer(4)
      notnull: true
      default: 0
    deleted:
      type: enum
      values: ['Y','N']
      notnull: true
      default: 'N'
  options:
    charset: utf8
    collate: utf8_general_ci
 
Localisation:
  connection: doctrine
  columns:
    id:
      type: integer(4)
      primary: true
      notnull: true
    tags_id:
      type: integer(4)
      notnull: true
    localisation_lang:
      type: string(5)
      notnull: true
    objets_id:
      type: integer(4)
      notnull: true
    objets_type:
      type: string(50)
      notnull: true
  relations:
    tag:
      class: Tag
      local: tags_id
      foreign: tags_id
      foreignAlias: localisations
      onDelete: cascade
      onUpdate: cascade
  indexes:
    fk_localisation_tags_id:
      fields: [tags_id]
  options:
    charset: utf8
    collate: utf8_general_ci
 
EvenementInActivite:
  connection: doctrine
  tableName: evenement_in_activite
  columns:
    id:
      type: integer(4)
      primary: true
      notnull: true
      autoincrement: true
    evenement_in_region_id:
      type: integer(4)
      notnull: true
    activites_id:
      type: integer(4)
      notnull: true
  relations:
    evenementInRegion:
      class: EvenementInRegion
      local: evenement_in_region_id
      foreign: evenement_in_region_id
      foreignAlias: evenementInActivites
      onDelete: cascade
      onUpdate: cascade
      foreignType: many
      owningSide: true
    activite:
      class: Activite
      local: activites_id
      foreign: activites_id
      foreignAlias: evenementInActivites
      onDelete: cascade
      onUpdate: cascade
  indexes:
    fk_ea_evenement_in_region_id:
      fields: [evenement_in_region_id]
    fk_ea_activites_id:
      fields: [activites_id]
  options:
    charset: utf8
    collate: utf8_general_ci
 
Albums:
  connection: doctrine
  actAs:
    Timestampable: ~
    I18n:
      fields: [albums_titre, albums_resume, albums_description, albums_meta_title, albums_meta_description, albums_meta_tag, deleted]
      actAs:
        Sluggable: { fields: [ albums_titre ], uniqueBy: [ lang, albums_titre ] }
  columns:
    id:
      type: integer(4)
      primary: true
      notnull: true
      autoincrement: true
    albums_active:
      type: enum
      values: ['Y','N']
      notnull: true
      default: 'N'
    position:
      type: integer(4)
      notnull: true
      default: 1
    albums_id:
      type: integer(4)
      primary: true
      notnull: true
    albums_titre:
      type: string(255)
      notnull: true
    albums_resume:
      type: string(255)
    albums_description:
      type: clob(65535)
    albums_meta_title:
      type: string(255)
    albums_meta_description:
      type: string(255)
    albums_meta_tag:
      type: string(255)
    deleted:
      type: enum
      values: ['Y','N']
      notnull: true
      default: 'N'
  options:
    charset: utf8
    collate: utf8_general_ci
 
Photos:
  connection: doctrine
  actAs:
    Timestampable: ~
    I18n:
      fields: [photos_titre, photos_alt, photos_resume, photos_description, deleted]
      actAs:
        Sluggable: { fields: [ photos_titre ], uniqueBy: [ lang, photos_titre ] }
  columns:
    photos_id:
      type: integer(4)
      primary: true
      notnull: true
      autoincrement: true
    photos_active:
      type: enum
      values: ['Y','N']
      notnull: true
      default: 'N'
    photos_url:
      type: string(50)
      default: null
    position:
      type: integer(4)
      notnull: true
      default: 1
    photos_titre:
      type: string(255)
      notnull: true
    photos_alt:
      type: string(255)
    photos_resume:
      type: string(255)
    photos_description:
      type: clob(65535)
    deleted:
      type: enum
      values: ['Y','N']
      notnull: true
      default: 'N'
  options:
    charset: utf8
    collate: utf8_general_ci
 
Videos:
  connection: doctrine
  actAs:
    Timestampable: ~
    I18n:
      fields: [videos_titre, videos_resume, videos_description, deleted]
      actAs:
        Sluggable: { fields: [ videos_titre ], uniqueBy: [ lang, videos_titre ] }
  columns:
    id:
      type: integer(4)
      primary: true
      notnull: true
      autoincrement: true
    videos_active:
      type: enum
      values: ['Y','N']
      notnull: true
      default: 'N'
    position:
      type: integer(4)
      notnull: true
      default: 1
    videos_id:
      type: integer(4)
      primary: true
      notnull: true
    videos_titre:
      type: string(255)
      notnull: true
    videos_resume:
      type: string(255)
    videos_description:
      type: clob(65535)
    deleted:
      type: enum
      values: ['Y','N']
      notnull: true
      default: 'N'
  options:
    charset: utf8
    collate: utf8_general_ci
 
AlbumModule:
  connection: doctrine
  tableName: album_module
  columns:
    albums_id:
      type: integer(4)
      primary: true
      notnull: true
    album_module:
      type: string(45)
      notnull: true
    modules_id:
      type: integer(4)
      notnull: true
  relations:
    album:
      class: Album
      local: albums_id
      foreign: albums_id
      foreignAlias: albumModules
      onDelete: cascade
      onUpdate: cascade
  indexes:
    fk_album_module_albums_id:
      fields: [albums_id]
  options:
    charset: utf8
 
Categories:
  connection: doctrine
  actAs:
    Timestampable: ~
    I18n:
      fields: [categories_nom, categories_resume, categories_description, categories_meta_title, categories_meta_description, categories_meta_tag, deleted]
      actAs:
        Sluggable: { fields: [ categories_nom ], uniqueBy: [ lang, categories_nom ] }
  columns:
    id:
      type: integer(4)
      primary: true
      notnull: true
      autoincrement: true
    categories_parent:
      type: integer(4)
      default: null
    categories_active:
      type: enum
      values: ['Y','N']
      notnull: true
      default: 'N'
    categories_vignette:
      type: string(50)
      default: null
    position:
      type: integer(4)
      notnull: true
      default: 1
    categories_id:
      type: integer(4)
      primary: true
      notnull: true
    categories_nom:
      type: string(255)
      notnull: true
    categories_resume:
      type: string(255)
    categories_description:
      type: clob(65535)
    categories_meta_title:
      type: string(255)
    categories_meta_description:
      type: string(255)
    categories_meta_tag:
      type: string(255)
    deleted:
      type: enum
      values: ['Y','N']
      notnull: true
      default: 'N'
  relations:
    categorie:
      class: Categorie
      local: categories_parent
      foreign: categories_id
      foreignAlias: categories
      onDelete: set null
      onUpdate: set null
  indexes:
    fk_categories_categories_parent:
      fields: [categories_parent]
  options:
    charset: utf8
    collate: utf8_general_ci
 
CategorieArticle:
  connection: doctrine
  tableName: categorie_article
  columns:
    categories_id:
      type: integer(4)
      primary: true
      notnull: true
    articles_id:
      type: integer(4)
      primary: true
      notnull: true
  relations:
    categorie:
      class: Categorie
      local: categories_id
      foreign: categories_id
      foreignAlias: categorieArticles
      onDelete: cascade
      onUpdate: cascade
      foreignType: many
      owningSide: true
    article:
      class: Article
      local: articles_id
      foreign: articles_id
      foreignAlias: categorieArticles
      onDelete: cascade
      onUpdate: cascade
  indexes:
    fk_categorie_article_categories_id:
      fields: [categories_id]
    fk_categorie_article_articles_id:
      fields: [articles_id]
 
Liens:
  connection: doctrine
  actAs:
    Timestampable: ~
    #Sortable:      ~
    I18n:
      fields: [liens_resume, liens_description, liens_url, deleted]
  columns:
    id:
      type: integer(4)
      primary: true
      notnull: true
      autoincrement: true
    liens_active:
      type: enum
      values: ['Y','N']
      notnull: true
      default: 'N'
    liens_target:
      type: enum
      values: ['Y','N']
      notnull: true
      default: 'N'
    liens_vignette:
      type: string(45)
      default: null
    deleted:
      type: enum
      values: ['Y','N']
      notnull: true
      default: 'N'
    position:
      type: integer(4)
      notnull: true
      default: 1
    liens_id:
      type: integer(4)
      primary: true
      notnull: true
    liens_resume:
      type: string(255)
    liens_description:
      type: clob(65535)
    liens_url:
      type: string(255)
      notnull: true
    deleted:
      type: enum
      values: ['Y','N']
      notnull: true
      default: 'N'
  options:
    charset: utf8
    collate: utf8_general_ci
 
Association:
  columns:
    associe_id:
      type: integer(4)
      primary: true
      notnull: true
    associe_to:
      type: integer(4)
      primary: true
      notnull: true
    association_type:
      type: string(50)
      notnull: true
  options:
    charset: utf8
    collate: utf8_general_ci
 
LienModule:
  connection: doctrine
  tableName: lien_module
  columns:
    id:
      type: integer(4)
      primary: true
      notnull: true
      autoincrement: true
    liens_id:
      type: integer(4)
      notnull: true
    objets_id:
      type: integer(4)
      notnull: true
    objets_module:
      type: string(50)
      notnull: true
  relations:
    lien:
      class: Lien
      local: liens_id
      foreign: liens_id
      foreignAlias: lienModule
      onDelete: cascade
      onUpdate: cascade
  indexes:
    fk_lien_module_liens_id:
      fields: [liens_id]
  options:
    charset: utf8
    collate: utf8_general_ci