From f54c8d694f3e3dfd5495cfffb3ec6c04a11f7e80 Mon Sep 17 00:00:00 2001 From: fomichev Date: Fri, 17 Apr 2026 16:25:56 +0300 Subject: [PATCH] =?utf8?q?feat(ERP-292):=20=D0=BC=D0=B8=D0=B3=D1=80=D0=B0?= =?utf8?q?=D1=86=D0=B8=D1=8F=20=D1=82=D0=B0=D0=B1=D0=BB=D0=B8=D1=86=D1=8B?= =?utf8?q?=20products=5F1c=5Fautomark=5Fpredictions?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- ...reate_products_1c_automark_predictions.php | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 erp24/migrations/m260417_000001_create_products_1c_automark_predictions.php diff --git a/erp24/migrations/m260417_000001_create_products_1c_automark_predictions.php b/erp24/migrations/m260417_000001_create_products_1c_automark_predictions.php new file mode 100644 index 00000000..934b6963 --- /dev/null +++ b/erp24/migrations/m260417_000001_create_products_1c_automark_predictions.php @@ -0,0 +1,43 @@ +createTable('products_1c_automark_predictions', [ + 'id' => $this->primaryKey(), + 'product_id' => $this->string(36)->notNull(), + 'category' => $this->string(255)->null(), + 'subcategory' => $this->string(255)->null(), + 'species' => $this->string(255)->null(), + 'sort' => $this->string(255)->null(), + 'type' => $this->string(255)->null(), + 'size' => $this->integer()->null(), + 'color' => $this->string(255)->null(), + 'confidence' => $this->float()->notNull(), + 'method' => $this->string(50)->notNull(), + 'status' => $this->smallInteger()->notNull()->defaultValue(0), + 'approved_by' => $this->integer()->null(), + 'created_at' => $this->timestamp()->notNull()->defaultExpression('NOW()'), + 'updated_at' => $this->timestamp()->null(), + ]); + + $this->createIndex('idx_automark_product_id', 'products_1c_automark_predictions', 'product_id'); + $this->createIndex('idx_automark_status', 'products_1c_automark_predictions', 'status'); + $this->addForeignKey( + 'fk_automark_product', + 'products_1c_automark_predictions', 'product_id', + 'products_1c', 'id', + 'CASCADE', 'CASCADE' + ); + } + + public function safeDown(): void + { + $this->dropTable('products_1c_automark_predictions'); + } +} -- 2.39.5