| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace addons\ScoreBonus\console\migrations;
- use yii\db\Migration;
- /**
- * Class M250519013327CreateQimallAddonsScoreBonusCapitalPool
- */
- class M250519013327CreateQimallAddonsScoreBonusCapitalPool extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql="CREATE TABLE `qimall_addons_score_bonus_capital_pool` (
- `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
- `mall_id` int(11) NOT NULL COMMENT '商城id',
- `bonus_price` decimal(14,2) NOT NULL COMMENT '当前分红池总额',
- `total_price` decimal(20,2) NOT NULL COMMENT '已发放分红总额',
- `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态',
- `created_at` int(11) DEFAULT NULL COMMENT '添加时间',
- `updated_at` int(11) DEFAULT NULL COMMENT '修改时间',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='分红池表';";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M250519013327CreateQimallAddonsScoreBonusCapitalPool cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M250519013327CreateQimallAddonsScoreBonusCapitalPool cannot be reverted.\n";
- return false;
- }
- */
- }
|