From c55d7699558ee8a069d068eeb862425d1a035a52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Odwa=C5=BCny?= Date: Mon, 13 Nov 2023 21:12:25 +0100 Subject: [PATCH] Update Version20231015123538.php --- src/Migrations/Version20231015123538.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Migrations/Version20231015123538.php b/src/Migrations/Version20231015123538.php index da21a135..c12d162c 100644 --- a/src/Migrations/Version20231015123538.php +++ b/src/Migrations/Version20231015123538.php @@ -22,7 +22,9 @@ public function getDescription(): string public function up(Schema $schema): void { - $this->addSql('ALTER TABLE bitbag_wishlist ADD created_at DATETIME NOT NULL, ADD updated_at DATETIME DEFAULT NULL'); + $this->addSql('ALTER TABLE bitbag_wishlist ADD created_at DATETIME DEFAULT NULL, ADD updated_at DATETIME DEFAULT NULL'); + $this->addSql('UPDATE bitbag_wishlist SET created_at = NOW()'); + $this->addSql('ALTER TABLE bitbag_wishlist CHANGE COLUMN created_at created_at DATETIME NOT NULL'); } public function down(Schema $schema): void