File tree Expand file tree Collapse file tree
packages/mysql-on-sqlite/tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11288,13 +11288,16 @@ public function testInlineReferencesIgnored(): void {
1128811288 $this->assertQuery( 'ALTER TABLE t_alter ADD a INT REFERENCES p (id)' );
1128911289 $this->assertQuery( 'INSERT INTO t_alter (a) VALUES (999)' );
1129011290 $this->assertEquals( array(), $this->assertQuery( "SELECT * FROM information_schema.referential_constraints WHERE table_name = 't_alter'" ) );
11291+ $this->assertEquals( array(), $this->assertQuery( "SELECT * FROM information_schema.table_constraints WHERE table_name = 't_alter'" ) );
11292+ $this->assertEquals( array(), $this->assertQuery( "SELECT * FROM information_schema.key_column_usage WHERE table_name = 't_alter'" ) );
1129111293
1129211294 // Parenthesized ALTER TABLE ADD (...) also ignores inline REFERENCES.
1129311295 $this->assertQuery( 'CREATE TABLE t_alter_paren (id INT)' );
1129411296 $this->assertQuery( 'ALTER TABLE t_alter_paren ADD (a INT REFERENCES p (id))' );
1129511297 $this->assertQuery( 'INSERT INTO t_alter_paren (a) VALUES (999)' );
1129611298 $this->assertEquals( array(), $this->assertQuery( "SELECT * FROM information_schema.referential_constraints WHERE table_name = 't_alter_paren'" ) );
1129711299 $this->assertEquals( array(), $this->assertQuery( "SELECT * FROM information_schema.table_constraints WHERE table_name = 't_alter_paren'" ) );
11300+ $this->assertEquals( array(), $this->assertQuery( "SELECT * FROM information_schema.key_column_usage WHERE table_name = 't_alter_paren'" ) );
1129811301
1129911302 // Explicit table-level FOREIGN KEY constraint still rejects the insert.
1130011303 $this->assertQuery( 'CREATE TABLE t_explicit (id INT, a INT, FOREIGN KEY (a) REFERENCES p (id))' );
You can’t perform that action at this time.
0 commit comments