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
458458 ->column ('id ' )->integer ()->primaryKey ()->autoIncrement ()
459459 ->column ('base_object_id ' )->references ('base_objects ' )->unique ()->comment ('@JsonCollection ' );
460460
461+ $ db ->table ('composite_fk_target_reference ' )
462+ ->column ('id ' )->integer ()->primaryKey ()->autoIncrement ()
463+ ->column ('label ' )->string ();
464+
461465 $ targetTable = $ db ->table ('composite_fk_target ' )
462- ->column ('id_1 ' )->integer ( )
466+ ->column ('id_1 ' )->references ( ' composite_fk_target_reference ' )
463467 ->column ('id_2 ' )->integer ()
464468 ->then ()->primaryKey (['id_1 ' , 'id_2 ' ]);
465469 $ db ->table ('composite_fk_source ' )
@@ -800,6 +804,10 @@ private static function initSchema(Connection $connection): void
800804 'person_id ' => 1 ,
801805 'boat_id ' => 1 ,
802806 ]);
807+ self ::insert ($ connection , 'composite_fk_target_reference ' , [
808+ 'id ' => 1 ,
809+ 'label ' => 'test '
810+ ]);
803811 self ::insert ($ connection , 'composite_fk_target ' , [
804812 'id_1 ' => 1 ,
805813 'id_2 ' => 1
You can’t perform that action at this time.
0 commit comments