File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -458,8 +458,12 @@ private static function initSchema(Connection $connection): void
458
458
->column ('id ' )->integer ()->primaryKey ()->autoIncrement ()
459
459
->column ('base_object_id ' )->references ('base_objects ' )->unique ()->comment ('@JsonCollection ' );
460
460
461
+ $ db ->table ('composite_fk_target_reference ' )
462
+ ->column ('id ' )->integer ()->primaryKey ()->autoIncrement ()
463
+ ->column ('label ' )->string ();
464
+
461
465
$ targetTable = $ db ->table ('composite_fk_target ' )
462
- ->column ('id_1 ' )->integer ( )
466
+ ->column ('id_1 ' )->references ( ' composite_fk_target_reference ' )
463
467
->column ('id_2 ' )->integer ()
464
468
->then ()->primaryKey (['id_1 ' , 'id_2 ' ]);
465
469
$ db ->table ('composite_fk_source ' )
@@ -800,6 +804,10 @@ private static function initSchema(Connection $connection): void
800
804
'person_id ' => 1 ,
801
805
'boat_id ' => 1 ,
802
806
]);
807
+ self ::insert ($ connection , 'composite_fk_target_reference ' , [
808
+ 'id ' => 1 ,
809
+ 'label ' => 'test '
810
+ ]);
803
811
self ::insert ($ connection , 'composite_fk_target ' , [
804
812
'id_1 ' => 1 ,
805
813
'id_2 ' => 1
You can’t perform that action at this time.
0 commit comments