| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace addons\DoubleCopy\console\migrations;
- use yii\db\Migration;
- /**
- * Class M230530142836AlertQimallDoubleCopyLevelOrSetting
- */
- class M230530142836AlertQimallDoubleCopyLevelOrSetting extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "ALTER TABLE `qimall_addons_double_copy_level_setting`
- ADD COLUMN `indirect_prize_type` tinyint(4) NULL DEFAULT 0 COMMENT '间推奖类型 0百分比 1 固定金额',
- ADD COLUMN `indirect_prize` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '间推奖励';
- ALTER TABLE `qimall_addons_double_copy_commission_item_setting_detail`
- ADD COLUMN `indirect_prize` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '间推奖';";
- $sql .= "INSERT INTO `qimall_global_var_map`(`name`, `title`, `type`, `is_addons`, `status`, `created_at`, `updated_at`) VALUES ('indirect_prize', '间推奖', 'CapitalTypeMap', 0, 1, 1654569888, 1654569888);";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230530142836AlertQimallDoubleCopyLevelOrSetting cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230530142836AlertQimallDoubleCopyLevelOrSetting cannot be reverted.\n";
- return false;
- }
- */
- }
|