Fixed weird migration

This commit is contained in:
snipe 2018-02-16 15:31:47 -08:00
parent 27c1bc0271
commit 5fd50040d3

View file

@ -12,9 +12,11 @@ class AddRememberTokenToUsersTable extends Migration
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->text('remember_token')->nullable()->default(NULL);
});
if (!Schema::hasColumn('users', 'remember_token')) {
Schema::table('users', function (Blueprint $table) {
$table->text('remember_token')->nullable()->default(null);
});
}
}
/**
@ -25,7 +27,7 @@ class AddRememberTokenToUsersTable extends Migration
public function down()
{
Schema::table('users', function (Blueprint $table) {
//
$table->dropColumn('remember_token');
});
}
}