fix:如果表存在,无法执行migration

This commit is contained in:
JaguarJack 2023-06-13 21:48:13 +08:00
parent a36fa86d8d
commit 2c035c7441

View File

@ -13,6 +13,8 @@ return new class extends Migration
*/
public function up()
{
if (Schema::hasTable('{table}')) { return; }
Schema::{method}('{table}', function (Blueprint $table) {
{content}
});