8000 修复补丁 表中增加注释造成的无法迁移的补丁 · czsvn/laravel_template_with_vue@8269b6a · GitHub
[go: up one dir, main page]

Skip to content

Commit 8269b6a

Browse files
committed
修复补丁 表中增加注释造成的无法迁移的补丁
1 parent dcc6280 commit 8269b6a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

backend/database/migrations/2018_02_24_140731_create_teachers_table.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ public function up()
3030
$table->unsignedTinyInteger('state')->comment('人员状态(1->正常 2->调出 3->退出 4->停薪留职)')->default(1);
3131
$table->unsignedTinyInteger('teaching_id')->comment('教学科目Id')->nullable;
3232
$table->timestamps();
33-
$table->comment('教职工信息表');
3433
$table->unique('card_id');
3534
$table->unique('phone');
3635
$table->unique('phone2');
37-
$table->foreign('teaching_id')->reference('id')->on('yz_teaching');
38-
$table->foreign('nation_id')->reference('id')->on('yz_nation');
36+
// 要设置外键的话 必须先保证相应的表格先存在
37+
// $table->foreign('teaching_id')->reference('id')->on('yz_teaching');
38+
// $table->foreign('nation_id')->reference('id')->on('yz_nation');
3939
});
4040
}
4141

backend/database/seeds/DatabaseSeeder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ public function run()
1414
$this->call(UsersTableSeeder::class);
1515
$this->call(RolesTableSeeder::class);
1616
$this->call(SessionsTableSeeder::class);
17+
$this->call(PermissionsTableSeeder::class);
1718
}
1819
}

0 commit comments

Comments
 (0)
0