From: fomichev Date: Thu, 26 Dec 2024 08:35:28 +0000 (+0300) Subject: Исправление миграции sent_kogort и добавление первичного ключа X-Git-Tag: 1.7~94^2~31 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=0a3ef54639893a73e4f637b02547a4be7a38381c;p=erp24_rep%2Fyii-erp24%2F.git Исправление миграции sent_kogort и добавление первичного ключа --- diff --git a/erp24/migrations/m241220_131428_create_sent_kogort_table.php b/erp24/migrations/m241220_131428_create_sent_kogort_table.php index cde25f6c..09993dcc 100644 --- a/erp24/migrations/m241220_131428_create_sent_kogort_table.php +++ b/erp24/migrations/m241220_131428_create_sent_kogort_table.php @@ -17,7 +17,7 @@ class m241220_131428_create_sent_kogort_table extends Migration if (!isset($tableSchema)) { $this->createTable(self::TABLE_NAME, [ - 'id' => $this->bigInteger(), + 'id' => $this->bigInteger()->comment('ID'), 'phone' => $this->string(15)->notNull()->comment('Телефон пользователя'), 'kogort_number' => $this->integer()->notNull()->comment('Номер типа когорты когорты'), 'kogort_date' => $this->date()->notNull()->comment('Дата когорты'), diff --git a/erp24/records/SentKogort.php b/erp24/records/SentKogort.php index eedc2fbc..bd74e55f 100644 --- a/erp24/records/SentKogort.php +++ b/erp24/records/SentKogort.php @@ -63,4 +63,9 @@ class SentKogort extends \yii\db\ActiveRecord 'created_at' => 'Дата создания записи', ]; } + + public static function primaryKey() + { + return ['id']; + } }