From 173fd625c9e791c41c9bca5a9dc0791ec471dfc4 Mon Sep 17 00:00:00 2001 From: Vladimir Fomichev Date: Sat, 1 Nov 2025 14:50:37 +0300 Subject: [PATCH] =?utf8?q?=D0=A3=D0=B1=D0=B8=D1=80=D0=B0=D0=B5=D0=BC=20?= =?utf8?q?=D0=B2=D0=BD=D0=B5=D1=88=D0=BD=D0=B8=D0=B9=20=D0=BA=D0=BB=D1=8E?= =?utf8?q?=D1=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- ...237_add_admin_position_id_field_to_admin_table.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/erp24/migrations/m251027_071237_add_admin_position_id_field_to_admin_table.php b/erp24/migrations/m251027_071237_add_admin_position_id_field_to_admin_table.php index 367c7e19..6b3991f7 100644 --- a/erp24/migrations/m251027_071237_add_admin_position_id_field_to_admin_table.php +++ b/erp24/migrations/m251027_071237_add_admin_position_id_field_to_admin_table.php @@ -19,15 +19,7 @@ class m251027_071237_add_admin_position_id_field_to_admin_table extends Migratio if (isset($tableSchema) && !isset($tableSchema->columns[self::COLUMN_NAME])) { $this->addColumn(self::TABLE_NAME, self::COLUMN_NAME, $this->integer()->null()->comment('ID должности администратора')); - $this->addForeignKey( - 'fk-admin-employee_position_id', - self::TABLE_NAME, - self::COLUMN_NAME, - 'erp24.employee_position', - 'id', - 'SET NULL', - 'CASCADE' - ); + } } @@ -39,7 +31,6 @@ class m251027_071237_add_admin_position_id_field_to_admin_table extends Migratio $tableSchema = $this->db->getTableSchema(self::TABLE_NAME); if (isset($tableSchema) && isset($tableSchema->columns[self::COLUMN_NAME])) { - $this->dropForeignKey('fk-admin-employee_position_id', self::TABLE_NAME); $this->dropColumn(self::TABLE_NAME, self::COLUMN_NAME); } else { echo "m251027_071237_add_admin_position_id_field_to_admin_table cannot be reverted.\n"; -- 2.39.5