Fix stupid migration? Maybe? Might be more trouble later

This commit is contained in:
snipe 2016-09-14 18:59:14 -07:00
parent 91a035ec5b
commit 5846f23d8b

View file

@ -12,6 +12,7 @@ class CreateActionlogTable extends Migration
*/ */
public function up() public function up()
{ {
if (!Schema::hasTable('action_logs')) {
Schema::create('action_logs', function (Blueprint $table) { Schema::create('action_logs', function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->integer('user_id')->nullable(); $table->integer('user_id')->nullable();
@ -34,6 +35,7 @@ class CreateActionlogTable extends Migration
$table->index('thread_id'); $table->index('thread_id');
}); });
} }
}
/** /**
* Reverse the migrations. * Reverse the migrations.
@ -42,6 +44,6 @@ class CreateActionlogTable extends Migration
*/ */
public function down() public function down()
{ {
Schema::drop('action_logs'); Schema::dropIfExists('action_logs');
} }
} }