Added script to run phinx migrations; updated tests table to have better labels

This commit is contained in:
Gregory Ballantine 2024-04-06 11:54:45 -04:00
parent 96a69a94ba
commit 0c1df2e7e6
2 changed files with 5 additions and 1 deletions

3
bin/docker-phinx.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
docker exec colossus-php ./vendor/bin/phinx "$@"

View File

@ -19,7 +19,8 @@ final class AddTestsTable extends AbstractMigration
public function change()
{
$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('component_id', 'integer', ['null' => false])
->addForeignKey('benchmark_id', 'benchmarks', 'id', ['delete'=> 'CASCADE', 'update'=> 'CASCADE'])