]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
feat(ERP-292): миграция — llm_verdict, llm_verified_at, llm_comment
authorfomichev <vladimir.fomichev@erp-flowers.ru>
Thu, 30 Apr 2026 15:06:30 +0000 (18:06 +0300)
committerfomichev <vladimir.fomichev@erp-flowers.ru>
Thu, 30 Apr 2026 15:06:30 +0000 (18:06 +0300)
erp24/migrations/m260430_000001_add_llm_fields_to_automark_predictions.php [new file with mode: 0644]

diff --git a/erp24/migrations/m260430_000001_add_llm_fields_to_automark_predictions.php b/erp24/migrations/m260430_000001_add_llm_fields_to_automark_predictions.php
new file mode 100644 (file)
index 0000000..f091861
--- /dev/null
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+use yii\db\Migration;
+
+class m260430_000001_add_llm_fields_to_automark_predictions extends Migration
+{
+    public function safeUp(): void
+    {
+        $this->addColumn(
+            'products_1c_automark_predictions',
+            'llm_verdict',
+            $this->string(20)->null()->defaultValue(null)->after('method')
+        );
+        $this->addColumn(
+            'products_1c_automark_predictions',
+            'llm_verified_at',
+            $this->timestamp()->null()->defaultValue(null)->after('llm_verdict')
+        );
+        $this->addColumn(
+            'products_1c_automark_predictions',
+            'llm_comment',
+            $this->string(500)->null()->defaultValue(null)->after('llm_verified_at')
+        );
+        $this->createIndex(
+            'idx_automark_llm_verdict',
+            'products_1c_automark_predictions',
+            'llm_verdict'
+        );
+    }
+
+    public function safeDown(): void
+    {
+        $this->dropIndex('idx_automark_llm_verdict', 'products_1c_automark_predictions');
+        $this->dropColumn('products_1c_automark_predictions', 'llm_comment');
+        $this->dropColumn('products_1c_automark_predictions', 'llm_verified_at');
+        $this->dropColumn('products_1c_automark_predictions', 'llm_verdict');
+    }
+}