| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M230328092048AlterQimallUserStatisticsTotal
- */
- class M230328092048AlterQimallUserStatisticsTotal extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = "ALTER TABLE qimall_user_statistics_total add share_nums bigint(20) not null default 0 COMMENT '分享次数';
- ALTER TABLE qimall_user_statistics_total add visit_nums bigint(20) not null default 0 COMMENT '访问次数';";
- $this->execute($sql);
- } catch (\Exception $e) {
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230328092048AlterQimallUserStatisticsTotal cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230328092048AlterQimallUserStatisticsTotal cannot be reverted.\n";
- return false;
- }
- */
- }
|