From c33c8e7153f914ce269af8d0f224f046a0798912 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 3 Aug 2022 16:50:09 +0100 Subject: [PATCH] [CAT] Always set the timestamp data from PHP so its UTC --- application/config/migration.php | 2 +- .../migrations/095_cat_change_timestamp.php | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 application/migrations/095_cat_change_timestamp.php diff --git a/application/config/migration.php b/application/config/migration.php index 9750ad13..bcbb0a02 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE; | be upgraded / downgraded to. | */ -$config['migration_version'] = 94; +$config['migration_version'] = 95; /* |-------------------------------------------------------------------------- diff --git a/application/migrations/095_cat_change_timestamp.php b/application/migrations/095_cat_change_timestamp.php new file mode 100644 index 00000000..c07a3b43 --- /dev/null +++ b/application/migrations/095_cat_change_timestamp.php @@ -0,0 +1,26 @@ +db->field_exists('timestamp', 'cat')) { + $this->db->query("ALTER TABLE `cat` CHANGE `timestamp` `timestamp` TIMESTAMP NULL DEFAULT NULL;"); + } + } + + public function down() + { + + } +}