| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M241016092919AddTableQimallUserTeamMonthStatistics
- */
- class M241016092919AddTableQimallUserTeamMonthStatistics extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "CREATE TABLE `qimall_user_team_month_statistics` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `mall_id` int(11) NOT NULL DEFAULT '0' COMMENT '商城id',
- `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户id',
- `month` varchar(10) NOT NULL DEFAULT '' COMMENT '年月',
- `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态,-1删除,0禁用,1正常',
- `created_at` int(11) NOT NULL DEFAULT '0',
- `updated_at` int(11) NOT NULL DEFAULT '0',
- `price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '支付完成业绩',
- `finish_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '订单完成业绩',
- PRIMARY KEY (`id`),
- KEY `m_u` (`mall_id`,`user_id`) USING BTREE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='会员月份团队实付业绩表';";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M241016092919AddTableQimallUserTeamMonthStatistics cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M241016092919AddTableQimallUserTeamMonthStatistics cannot be reverted.\n";
- return false;
- }
- */
- }
|