From 96ac6feefd55e463845dde1a36c676bcef827a17 Mon Sep 17 00:00:00 2001 From: ryuring Date: Tue, 27 Feb 2024 16:01:43 +0900 Subject: [PATCH] =?UTF-8?q?PostgreSQL=E7=92=B0=E5=A2=83=E3=81=AB=E3=81=A6?= =?UTF-8?q?=E3=82=AB=E3=82=B9=E3=82=BF=E3=83=A0=E3=82=B3=E3=83=B3=E3=83=86?= =?UTF-8?q?=E3=83=B3=E3=83=84=E3=81=8C=E3=82=A4=E3=83=B3=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=83=BC=E3=83=AB=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=84=E5=95=8F?= =?UTF-8?q?=E9=A1=8C=E3=82=92=E6=94=B9=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20230117094760_CreateCustomFields.php | 2 +- ...203000000_AlterMaxLengthOnCustomFields.php | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/plugins/bc-custom-content/config/Migrations/20230117094760_CreateCustomFields.php b/plugins/bc-custom-content/config/Migrations/20230117094760_CreateCustomFields.php index fcaa4f86ea..e5fffae6a9 100644 --- a/plugins/bc-custom-content/config/Migrations/20230117094760_CreateCustomFields.php +++ b/plugins/bc-custom-content/config/Migrations/20230117094760_CreateCustomFields.php @@ -82,7 +82,7 @@ public function up(): void 'limit' => null, 'null' => true, ]) - ->addColumn('max_length', 'boolean', [ + ->addColumn('max_length', 'integer', [ 'default' => false, 'limit' => null, 'null' => true, diff --git a/plugins/bc-custom-content/config/Migrations/20240203000000_AlterMaxLengthOnCustomFields.php b/plugins/bc-custom-content/config/Migrations/20240203000000_AlterMaxLengthOnCustomFields.php index 36105e0291..29451dd50b 100755 --- a/plugins/bc-custom-content/config/Migrations/20240203000000_AlterMaxLengthOnCustomFields.php +++ b/plugins/bc-custom-content/config/Migrations/20240203000000_AlterMaxLengthOnCustomFields.php @@ -11,13 +11,18 @@ class AlterMaxLengthOnCustomFields extends BcMigration */ public function change() { - $this->table('custom_fields') - ->changeColumn('max_length', 'integer', [ - 'default' => null, - 'limit' => null, - 'null' => true, - ]) - ->update(); + // 2024/02/27 ryuring + // PostgreSQLのカラム変更ができないため、20230117094760_CreateCustomFields.php にて直接変更し + // こちらでは何もしないように調整 + // phinxでの管理に影響する可能性があるため削除しないおく + +// $this->table('custom_fields') +// ->changeColumn('max_length', 'integer', [ +// 'default' => null, +// 'limit' => null, +// 'null' => true, +// ]) +// ->update(); } }