From 0c1df2e7e643d998a54cf754709f8c7a32c2faae Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Sat, 6 Apr 2024 11:54:45 -0400 Subject: [PATCH] Added script to run phinx migrations; updated tests table to have better labels --- bin/docker-phinx.sh | 3 +++ db/migrations/20230923020649_add_tests_table.php | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100755 bin/docker-phinx.sh diff --git a/bin/docker-phinx.sh b/bin/docker-phinx.sh new file mode 100755 index 0000000..4b38c03 --- /dev/null +++ b/bin/docker-phinx.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +docker exec colossus-php ./vendor/bin/phinx "$@" diff --git a/db/migrations/20230923020649_add_tests_table.php b/db/migrations/20230923020649_add_tests_table.php index 00b8a7c..907fb45 100644 --- a/db/migrations/20230923020649_add_tests_table.php +++ b/db/migrations/20230923020649_add_tests_table.php @@ -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'])