From: vladfo Date: Fri, 18 Oct 2024 17:01:25 +0000 (+0300) Subject: Изменение миграции и удаление новой X-Git-Tag: 1.7~228^2~30 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=eb418a91e994368a26d29f648edd6a45c84d828b;p=erp24_rep%2Fyii-erp24%2F.git Изменение миграции и удаление новой --- diff --git a/erp24/migrations/m241015_125203_create_cluster_admin_table.php b/erp24/migrations/m241015_125203_create_cluster_admin_table.php index ee4e5722..36374ebd 100644 --- a/erp24/migrations/m241015_125203_create_cluster_admin_table.php +++ b/erp24/migrations/m241015_125203_create_cluster_admin_table.php @@ -19,6 +19,7 @@ class m241015_125203_create_cluster_admin_table extends Migration 'admin_id' => $this->integer()->notNull()->comment('ID пользователя'), 'date_start' => $this->date()->notNull()->comment('Дата начала привязки'), 'date_end' => $this->date()->defaultValue('2100-01-01')->notNull()->comment('Дата окончания привязки'), + 'active' => $this->tinyInteger()->notNull()->defaultValue(0)->comment('0 - запись не активная 1 - запись привязки активная'), ]); } diff --git a/erp24/migrations/m241018_114640_alter_table_cluster_admin_add_column_active.php b/erp24/migrations/m241018_114640_alter_table_cluster_admin_add_column_active.php deleted file mode 100644 index c3e1a27e..00000000 --- a/erp24/migrations/m241018_114640_alter_table_cluster_admin_add_column_active.php +++ /dev/null @@ -1,42 +0,0 @@ -addColumn(self::TABLE_NAME, 'active', $this->tinyInteger()->notNull()->defaultValue(0) - ->after('date_end')->comment('0 - запись не активная 1 - запись привязки активная')); - } - - /** - * {@inheritdoc} - */ - public function safeDown() - { - $this->dropColumn(self::TABLE_NAME, 'active'); - } - - /* - // Use up()/down() to run migration code without a transaction. - public function up() - { - - } - - public function down() - { - echo "m241018_114640_alter_table_cluster_admin_add_column_active cannot be reverted.\n"; - - return false; - } - */ -}