From 75b86461ea905c8f77df7775f3ed4456db3d207c Mon Sep 17 00:00:00 2001 From: HB9HIL <80885850+HB9HIL@users.noreply.github.com> Date: Tue, 13 Aug 2024 13:38:20 +0200 Subject: [PATCH] make mig 196 compatible with older mysql versions With utf8mb4 a constraint of 255 results in a maximum possible primary key of 1020 bytes which is larger then the maximum 767 bytes in older MySQL versions. Changing the constraint to 191 results in a max. primary key of 764 bytes which will work with those ancient versions and 191 is still enough for this column. The id's in the cron table are text, why we can't use numerical ID's here --- application/migrations/196_cron_table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/migrations/196_cron_table.php b/application/migrations/196_cron_table.php index f8b1dfce3..6c15040fe 100644 --- a/application/migrations/196_cron_table.php +++ b/application/migrations/196_cron_table.php @@ -11,7 +11,7 @@ class Migration_cron_table extends CI_Migration { $this->dbforge->add_field(array( 'id' => array( 'type' => 'VARCHAR', - 'constraint' => '255', + 'constraint' => '191', 'null' => FALSE, ), 'enabled' => array(