| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M240705145203InsertQimallDiyComponents
- */
- class M240705145203InsertQimallDiyComponents 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
- ('bg-music', '背景音乐', 'img_text', '', 1, 0, '{\"is_drag\":\"false\",\"is_up\":\"false\",\"id_down\":\"false\",\"is_copy\":\"false\"}', 999, '', 1, 1634538238, 1634538238),
- ('order-multi-broadcast', '多订单播报', 'img_text', '', 1, 0, '{\"is_drag\":\"false\",\"is_up\":\"false\",\"id_down\":\"false\",\"is_copy\":\"false\"}', 999, '', 1, 1634538238, 1634538238);";
- $this->execute($sql);
- } catch (\Exception $e) {
- \Yii::error('M240705145203InsertQimallDiyComponents:' . $e->getMessage());
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240705145203InsertQimallDiyComponents cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M240705145203InsertQimallDiyComponents cannot be reverted.\n";
- return false;
- }
- */
- }
|