From 8abd649216f80a691e73a60b8ddf1a1e4e14656d Mon Sep 17 00:00:00 2001 From: vladfo Date: Fri, 19 Jul 2024 16:19:48 +0300 Subject: [PATCH] change created_at in migration --- .../m240719_090134_create_motivation_values_table.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erp24/migrations/m240719_090134_create_motivation_values_table.php b/erp24/migrations/m240719_090134_create_motivation_values_table.php index f87eb3ed..bf9022ef 100644 --- a/erp24/migrations/m240719_090134_create_motivation_values_table.php +++ b/erp24/migrations/m240719_090134_create_motivation_values_table.php @@ -23,8 +23,8 @@ class m240719_090134_create_motivation_values_table extends Migration 'name' => $this->string()->notNull(), 'data_type' => "data_type_enum NOT NULL", 'is_active' => $this->boolean()->defaultValue(true), - 'created_at' => $this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'), - 'updated_at' => $this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'), + 'created_at' => $this->datetime()->notNull()->comment('дата создания записи'), + 'updated_at' => $this->datetime()->notNull()->comment('дата изменения записи'), ]); $this->createIndex('idx-motivation_values-name', '{{%motivation_values}}', 'name', true); -- 2.39.5