From e3785bc7d5acca1eb483c3fa2f04077f13758dac Mon Sep 17 00:00:00 2001 From: Vladimir Fomichev Date: Tue, 17 Jun 2025 14:39:33 +0300 Subject: [PATCH] =?utf8?q?=D0=9C=D0=B8=D0=B3=D1=80=D0=B0=D1=86=D0=B8=D1=8F?= =?utf8?q?=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5?= =?utf8?q?=20=D0=BA=D0=BE=D0=BB=D0=BE=D0=BD=D0=BA=D0=B8=20=D1=81=D0=BF?= =?utf8?q?=D0=B8=D1=81=D0=B0=D0=BD=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- ...tr_quantity_column_in_autoplannogramma.php | 6 +-- ...offs_quantity_to_autoplanogramma_table.php | 37 +++++++++++++++++++ 2 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 erp24/migrations/m250617_113739_add_column_writeoffs_quantity_to_autoplanogramma_table.php diff --git a/erp24/migrations/m250610_085127_aletr_quantity_column_in_autoplannogramma.php b/erp24/migrations/m250610_085127_aletr_quantity_column_in_autoplannogramma.php index 76d4a56c..1a96a9f4 100644 --- a/erp24/migrations/m250610_085127_aletr_quantity_column_in_autoplannogramma.php +++ b/erp24/migrations/m250610_085127_aletr_quantity_column_in_autoplannogramma.php @@ -11,7 +11,6 @@ class m250610_085127_aletr_quantity_column_in_autoplannogramma extends Migration { $this->alterColumn('autoplannogramma', 'quantity', $this->float()->comment('Количество')); $this->alterColumn('autoplannogramma', 'quantity_forecast',$this->float()->comment('Количество рассчитанное')); - $this->addColumn('autoplannogramma', 'writeoffs_forecast',$this->float()->comment('Количество списаний')); } /** @@ -19,8 +18,7 @@ class m250610_085127_aletr_quantity_column_in_autoplannogramma extends Migration */ public function safeDown() { - $this->dropColumn('autoplannogramma', 'quantity', $this->integer()->comment('Количество')); - $this->dropColumn('autoplannogramma', 'quantity_forecast',$this->integer()->comment('Количество рассчитанное')); - $this->dropColumn('autoplannogramma', 'writeoffs_forecast',$this->float()->comment('Количество списаний')); + $this->alterColumn('autoplannogramma', 'quantity', $this->integer()->comment('Количество')); + $this->alterColumn('autoplannogramma', 'quantity_forecast',$this->integer()->comment('Количество рассчитанное')); } } diff --git a/erp24/migrations/m250617_113739_add_column_writeoffs_quantity_to_autoplanogramma_table.php b/erp24/migrations/m250617_113739_add_column_writeoffs_quantity_to_autoplanogramma_table.php new file mode 100644 index 00000000..ed9fe48e --- /dev/null +++ b/erp24/migrations/m250617_113739_add_column_writeoffs_quantity_to_autoplanogramma_table.php @@ -0,0 +1,37 @@ +addColumn('autoplannogramma', 'writeoffs_forecast',$this->float()->comment('Количество списаний')); + } + + /** + * {@inheritdoc} + */ + public function safeDown() + { + $this->dropColumn('autoplannogramma', 'writeoffs_forecast',$this->float()->comment('Количество списаний')); + } + + /* + // Use up()/down() to run migration code without a transaction. + public function up() + { + + } + + public function down() + { + echo "m250617_113739_add_column_writeoffs_quantity_to_autoplanogramma_table cannot be reverted.\n"; + + return false; + } + */ +} -- 2.39.5