From 559eb81a5985bee72132eb708bb4f139b46439e0 Mon Sep 17 00:00:00 2001 From: Mat Fish Date: Fri, 26 Jan 2024 09:57:29 +0200 Subject: [PATCH] fix #6 --- CHANGELOG.md | 4 ++++ src/migrations/Install.php | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90854e0..1eeb5f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Release Notes for Optimum +## 1.3.0 - 2024-01-26 +### Fixed +- Install Migration: Use dateTime()->notNull() instead of timestamp() [(#6)](https://github.com/matfish2/craft-optimum/issues/6) + ## 1.2.2 - 2023-10-09 - Validate Unique Name and Handle [(#4)](https://github.com/matfish2/craft-optimum/issues/4) - Hard Delete Experiment Element[(#4)](https://github.com/matfish2/craft-optimum/issues/4) diff --git a/src/migrations/Install.php b/src/migrations/Install.php index f3dd462..81f6661 100644 --- a/src/migrations/Install.php +++ b/src/migrations/Install.php @@ -19,8 +19,8 @@ public function safeUp() 'startAt' => $this->dateTime()->null(), 'endAt' => $this->dateTime()->null(), 'enabled' => $this->boolean()->defaultValue(false), - 'dateCreated' => $this->timestamp(), - 'dateUpdated' => $this->timestamp() + 'dateCreated' => $this->dateTime()->notNull(), + 'dateUpdated' => $this->dateTime()->notNull() ]); } @@ -32,8 +32,8 @@ public function safeUp() 'handle' => $this->string()->notNull(), // Used as template name 'description' => $this->string()->null(), 'weight' => $this->smallInteger()->notNull(), // in percents - 'dateCreated' => $this->timestamp(), - 'dateUpdated' => $this->timestamp() + 'dateCreated' => $this->dateTime()->notNull(), + 'dateUpdated' => $this->dateTime()->notNull() ]); } }