| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M230809140753AlterQimallFreightRules
- */
- class M230809140753AlterQimallFreightRules extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = 'ALTER TABLE `qimall_freight_rules` ADD COLUMN `compute_type` tinyint(2) NULL DEFAULT 1 COMMENT "计算方式[1=按不同商品计算,2=按同件商品计算]";';
- $this->execute($sql);
- } catch (\Exception $e) {
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230809140753AlterQimallFreightRules cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230809140753AlterQimallFreightRules cannot be reverted.\n";
- return false;
- }
- */
- }
|