From: vladfo Date: Fri, 18 Oct 2024 07:01:06 +0000 (+0300) Subject: Добавил миграцию удаления X-Git-Tag: 1.6~30^2~6 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=7249b15e4813b5e9635927d5b45197764bd75cdf;p=erp24_rep%2Fyii-erp24%2F.git Добавил миграцию удаления --- diff --git a/erp24/migrations/m241018_065706_alter_table_city_store_drop_column_cluster_id.php b/erp24/migrations/m241018_065706_alter_table_city_store_drop_column_cluster_id.php new file mode 100644 index 00000000..2d549a36 --- /dev/null +++ b/erp24/migrations/m241018_065706_alter_table_city_store_drop_column_cluster_id.php @@ -0,0 +1,46 @@ +dropColumn(self::TABLE_NAME, 'cluster_id'); + } + + /** + * {@inheritdoc} + */ + public function safeDown() + { + + $this->addColumn(self::TABLE_NAME, 'cluster_id', $this->integer()->notNull()->after('administrator_id')); + } + + /* + // Use up()/down() to run migration code without a transaction. + public function up() + { + + } + + public function down() + { + echo "m241018_065706_alter_table_city_store_drop_column_cluster_id cannot be reverted.\n"; + + return false; + } + */ +}