]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Изменение мягкого удаления
authorfomichev <vladimir.fomichev@erp-flowers.ru>
Tue, 14 Jan 2025 09:57:53 +0000 (12:57 +0300)
committerfomichev <vladimir.fomichev@erp-flowers.ru>
Tue, 14 Jan 2025 09:57:53 +0000 (12:57 +0300)
erp24/migrations/m250113_104214_add_deleted_at_column_to_timetable.php

index 10fcc5f98d40acdd90dc91ecdda27f9a04fae91c..cd24e66ac3c7d557de06db8f7d7803aced7c141a 100644 (file)
@@ -17,7 +17,7 @@ class m250113_104214_add_deleted_at_column_to_timetable extends Migration
             return;
         }
 
-        if ($this->db->schema->getTableSchema(self::TABLE_NAME)->getColumn('active') === null) {
+        if ($this->db->schema->getTableSchema(self::TABLE_NAME)->getColumn('deleted_at') === null) {
             $this->addColumn(
                 self::TABLE_NAME,
                 'active',
@@ -46,7 +46,8 @@ class m250113_104214_add_deleted_at_column_to_timetable extends Migration
         }
 
         if ($this->db->schema->getTableSchema(self::TABLE_NAME)->getColumn('deleted_at') !== null) {
-
+            $this->dropColumn(self::TABLE_NAME, 'active');
+            $this->dropColumn(self::TABLE_NAME, 'deleted_by');
             $this->dropColumn(self::TABLE_NAME, 'deleted_at');
         }
     }