@@ -1,30 +0,0 @@
-<?php
-
-use Illuminate\Support\Facades\Schema;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-class UpdateUsersTable extends Migration
-{
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::table('users', function (Blueprint $table) {
- $table->string('mine_role')->nullable()->comment('区域权限');
- });
- }
- * Reverse the migrations.
- public function down()
- //
-}
@@ -14,7 +14,9 @@ class UpdateUsersTable0519 extends Migration
public function up()
{
Schema::table('users', function (Blueprint $table) {
+ if(!Schema::hasColumn('users','mine_role')) {
+ $table->string('mine_role')->nullable()->comment('区域权限');
+ }
});
}