File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -191,6 +191,16 @@ function testForeignKeys(){
191191 $ this ->assertEquals ($ tbl ['indexes ' ][0 ]['ref_cols ' ], array (array ("name " => "f_bar " )));
192192 $ this ->assertEquals ($ tbl ['indexes ' ][0 ]['ref_match ' ], "FULL " );
193193 $ this ->assertEquals ($ tbl ['indexes ' ][0 ]['ref_on_delete ' ], "SET NULL " );
194+
195+ $ tbl = $ this ->get_first_table ("CREATE TABLE foo (bar INT, FOREIGN KEY bar (qux, `quux`) REFERENCES f_foo (f_bar) " );
196+ $ this ->assertEquals ($ tbl ['indexes ' ][0 ]['type ' ], "FOREIGN " );
197+ $ this ->assertEquals ($ tbl ['indexes ' ][0 ]['name ' ], "bar " );
198+ $ this ->assertEquals ($ tbl ['indexes ' ][0 ]['cols ' ], array (
199+ array ("name " => "qux " ),
200+ array ("name " => "quux " ),
201+ ));
202+ $ this ->assertEquals ($ tbl ['indexes ' ][0 ]['ref_table ' ], "f_foo " );
203+ $ this ->assertEquals ($ tbl ['indexes ' ][0 ]['ref_cols ' ], array (array ("name " => "f_bar " )));
194204 }
195205
196206 function testChecks (){
You can’t perform that action at this time.
0 commit comments