| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace addons\Clockin\console\migrations;
- use yii\db\Migration;
- /**
- * Class M230809075639InsertQimallDiyComponents
- */
- class M230809075639InsertQimallDiyComponents extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql="INSERT INTO `qimall_diy_components` ( `code`, `title`, `group`, `icon`, `count`, `is_top`, `permission`, `sort`, `source`, `status`, `created_at`, `updated_at`) VALUES ('clockin', '任务打卡', 'marketing', '', 999, 0, '{\"is_drag\":\"true\",\"is_up\":\"true\",\"id_down\":\"true\",\"is_copy\":\"true\"}', 999, 'Clockin', 1, 1634538238, 1634538238);";
- $this->execute($sql);
- }catch (\Exception $e){
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230809075639InsertQimallDiyComponents cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230809075639InsertQimallDiyComponents cannot be reverted.\n";
- return false;
- }
- */
- }
|