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