Added script to run phinx migrations; updated tests table to have better labels
This commit is contained in:
parent
96a69a94ba
commit
0c1df2e7e6
3
bin/docker-phinx.sh
Executable file
3
bin/docker-phinx.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
docker exec colossus-php ./vendor/bin/phinx "$@"
|
@ -19,7 +19,8 @@ final class AddTestsTable extends AbstractMigration
|
|||||||
public function change()
|
public function change()
|
||||||
{
|
{
|
||||||
$table = $this->table('tests');
|
$table = $this->table('tests');
|
||||||
$table->addColumn('date_tag', 'string', ['null' => false])
|
$table->addColumn('title', 'string', ['null' => false])
|
||||||
|
->addColumn('description', 'string')
|
||||||
->addColumn('benchmark_id', 'integer', ['null' => false])
|
->addColumn('benchmark_id', 'integer', ['null' => false])
|
||||||
->addColumn('component_id', 'integer', ['null' => false])
|
->addColumn('component_id', 'integer', ['null' => false])
|
||||||
->addForeignKey('benchmark_id', 'benchmarks', 'id', ['delete'=> 'CASCADE', 'update'=> 'CASCADE'])
|
->addForeignKey('benchmark_id', 'benchmarks', 'id', ['delete'=> 'CASCADE', 'update'=> 'CASCADE'])
|
||||||
|
Loading…
Reference in New Issue
Block a user