fix:如果表存在,无法执行migration
This commit is contained in:
parent
a36fa86d8d
commit
2c035c7441
@ -13,6 +13,8 @@ return new class extends Migration
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
|
if (Schema::hasTable('{table}')) { return; }
|
||||||
|
|
||||||
Schema::{method}('{table}', function (Blueprint $table) {
|
Schema::{method}('{table}', function (Blueprint $table) {
|
||||||
{content}
|
{content}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user