--- /dev/null
+<?php
+
+use yii\db\Migration;
+
+/**
+ * Class m250203_094609_create_bouquets_tables
+ */
+class m250203_094609_create_bouquets_tables extends Migration
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function safeUp()
+ {
+ $this->createTable('erp24.bouquet_composition_products', [
+ 'id' => $this->primaryKey(),
+ 'bouquet_id' => $this->integer()->notNull()->comment('ID букета'),
+ 'product_guid' => $this->string(255)->notNull()->comment('GUID продукта'),
+ 'count' => $this->float()->comment('Количество продукта'),
+ 'created_at' => $this->dateTime()->comment('Дата создания'),
+ 'updated_at' => $this->dateTime()->comment('Дата обновления'),
+ 'created_by' => $this->integer()->comment('ID создателя записи'),
+ 'updated_by' => $this->integer()->comment('ID обновителя записи'),
+ ]);
+
+ $this->createTable('erp24.bouquet_composition', [
+ 'id' => $this->primaryKey(),
+ 'guid' => $this->string(255)->comment('GUID букета'),
+ 'name' => $this->string(255)->notNull()->comment('Название букета'),
+ 'matrix_type_id' => $this->integer()->comment('ИД типа матрицы'),
+ 'photo_id' => $this->integer()->comment('ИД фото'),
+ 'video_id' => $this->integer()->comment('ИД видео'),
+ 'created_at' => $this->dateTime()->comment('Дата создания'),
+ 'updated_at' => $this->dateTime()->comment('Дата обновления'),
+ 'created_by' => $this->integer()->comment('ID создателя записи'),
+ 'updated_by' => $this->integer()->comment('ID обновителя записи'),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function safeDown()
+ {
+ $this->dropTable('erp24.bouquet_composition_products');
+ $this->dropTable('erp24.bouquet_composition');
+ }
+}