| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M250605090329CreateQimallUserTeamProfitStatisticsLog
- */
- class M250605090329CreateQimallUserTeamProfitStatisticsLog extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "CREATE TABLE `qimall_user_team_profit_statistics_log` (
- `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
- `mall_id` int(11) NOT NULL COMMENT '商城id',
- `goods_id` int(11) NOT NULL COMMENT '商品id',
- `order_detail_id` int(11) NOT NULL COMMENT '子订单id',
- `order_id` int(11) NOT NULL COMMENT '订单id',
- `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态(-1:删除,1:启用)',
- `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 "M250605090329CreateQimallUserTeamProfitStatisticsLog cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M250605090329CreateQimallUserTeamProfitStatisticsLog cannot be reverted.\n";
- return false;
- }
- */
- }
|