From 11ea31089ef3b6be265978a03c31eaaac3fc2076 Mon Sep 17 00:00:00 2001 From: Mat Fish Date: Fri, 26 Jan 2024 10:19:47 +0200 Subject: [PATCH] Install migration: use `dateTime()->notNull()` instead of `timestamp()` --- CHANGELOG.md | 4 ++++ src/migrations/Install.php | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 225a789..2e390ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Release Notes for Element Meta +## 4.1.0 - 2024-01-26 +### Fixed +- Install migration: use `dateTime()->notNull()` instead of `timestamp()` + ## 4.0.0 - 2023-07-30 > {note} Breaking Change. See [README](https://github.com/matfish2/craft-entry-meta#migrating-to-version-4) for further information ### Improved diff --git a/src/migrations/Install.php b/src/migrations/Install.php index d8bd04a..345ab32 100644 --- a/src/migrations/Install.php +++ b/src/migrations/Install.php @@ -16,8 +16,8 @@ public function safeUp() 'elementType' => $this->string()->notNull(), 'elementId' => $this->integer()->notNull(), 'data' => $this->text()->notNull(), - 'dateCreated' => $this->timestamp(), - 'dateUpdated' => $this->timestamp() + 'dateCreated' => $this->dateTime()->notNull(), + 'dateUpdated' => $this->dateTime()->notNull() ]); $this->createIndex('unique_element', '{{%elementmeta}}', ['elementType', 'elementId'], true);