Fixed derp problem with many-to-many relationship table for tests and benchmarks
This commit is contained in:
parent
6eaf7a0ba9
commit
15377da52d
@ -14,11 +14,10 @@ final class AddTestsTable extends AbstractMigration {
|
|||||||
->addTimestamps()
|
->addTimestamps()
|
||||||
->create();
|
->create();
|
||||||
|
|
||||||
// many-to-many relationship with benchmarks
|
|
||||||
$table = $this->table('tests_benchmarks');
|
$table = $this->table('tests_benchmarks');
|
||||||
->addColumn('component_id', 'integer', ['null' => false])
|
$table->addColumn('test_id', 'integer', ['null' => false])
|
||||||
->addColumn('benchmark_id', 'integer', ['null' => false])
|
->addColumn('benchmark_id', 'integer', ['null' => false])
|
||||||
->addForeignKey('component_id', 'components', 'id', ['delete'=> 'CASCADE', 'update'=> 'CASCADE'])
|
->addForeignKey('test_id', 'tests', 'id', ['delete'=> 'CASCADE', 'update'=> 'CASCADE'])
|
||||||
->addForeignKey('benchmark_id', 'benchmarks', 'id', ['delete'=> 'CASCADE', 'update'=> 'CASCADE'])
|
->addForeignKey('benchmark_id', 'benchmarks', 'id', ['delete'=> 'CASCADE', 'update'=> 'CASCADE'])
|
||||||
->create();
|
->create();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user