| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?php
- namespace addons\Agent\console\migrations;
- use yii\db\Migration;
- /**
- * Class M230523072613AgentAoKaLanRepurchaseReward
- */
- class M230523072613AgentAoKaLanRepurchaseReward extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $this->execute("CREATE TABLE `qimall_addons_agent_distribution_setting` (
- `id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
- `mall_id` INT(11) NOT NULL COMMENT '所属商城',
- `item_id` INT(11) NOT NULL COMMENT '对象ID',
- `key` VARCHAR(255) NOT NULL COMMENT '配置key' COLLATE 'utf8mb4_general_ci',
- `value` JSON NOT NULL COMMENT '配置值',
- `created_at` INT(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
- `updated_at` INT(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
- `status` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '-1已删除,1正常,0禁用',
- `deleted_at` INT(11) NOT NULL DEFAULT '0' COMMENT '删除时间',
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `item_id` (`item_id`) USING BTREE
- )
- COMMENT='层级分销'
- COLLATE='utf8mb4_general_ci'
- ENGINE=InnoDB;");
-
- $this->execute("INSERT INTO `qimall_global_var_map` (`name`, `title`, `type`, `is_addons`, `created_at`, `updated_at`) VALUES ('agent_distribution_reward', '公司奖励', 'CapitalTypeMap', 1, 1654569888, 1654569888);");
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230523072613AgentAoKaLanRepurchaseReward cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230523072613AgentAoKaLanRepurchaseReward cannot be reverted.\n";
- return false;
- }
- */
- }
|