| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?php
- namespace addons\Course\console\migrations;
- use yii\db\Migration;
- /**
- * Class M220812090757InsertQimallLinkCategory
- */
- class M220812090757InsertQimallLinkCategory extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M220812090757InsertQimallLinkCategory cannot be reverted.\n";
- return false;
- }
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- try{
- $table ='qimall_link_category';
- $this->insert($table, [
- 'name' => 'course_cate',
- 'title' => '视频课程',
- 'pid' => 19,
- 'is_list' => 1,
- 'remark' => '',
- 'status' => 1,
- 'created_at' => 1659584481,
- 'updated_at' => 1659584481,
- ]);
- }catch (\Exception $e){
- }
- }
- public function down()
- {
- echo "M220812090757InsertQimallLinkCategory cannot be reverted.\n";
- return false;
- }
- }
|