| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace addons\Store\console\migrations;
- use yii\db\Migration;
- /**
- * Class M230215102652InsertQimallLinkCategory
- */
- class M230215102652InsertQimallLinkCategory extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = "
- INSERT INTO `qimall_link_category` (`name`, `title`, `pid`, `is_list`, `remark`, `status`, `created_at`, `updated_at`) VALUES ('best-sellers', '全场热卖', 19, 1, NULL, 1, 1675237611, 1675237611);
- INSERT INTO `qimall_link_category` ( `name`, `title`, `pid`, `is_list`, `remark`, `status`, `created_at`, `updated_at`) VALUES ( 'store_cate_recommend', '门店分类', 19, 1, NULL, 1, 1675241765, 1675241765);
- ";
- $this->execute($sql);
- } catch (\Exception $e) {
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230215102652InsertQimallLinkCategory cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230215102652InsertQimallLinkCategory cannot be reverted.\n";
- return false;
- }
- */
- }
|