Skip to content

A free open source IT asset/license management system

Fixed weird migration

snipe5fd50040d3b6
diff --git a/database/migrations/2016_02_19_070119_add_remember_token_to_users_table.php b/database/migrations/2016_02_19_070119_add_remember_token_to_users_table.php
index d5595ac1d5..6270018e53 100644
--- a/database/migrations/2016_02_19_070119_add_remember_token_to_users_table.php
+++ b/database/migrations/2016_02_19_070119_add_remember_token_to_users_table.php
@@ -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');
});
}
}