Skip to content

Commit

Permalink
Fixed broken Database Migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
Arrow768 committed Jan 19, 2016
1 parent 5991429 commit babea7b
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions database/migrations/2015_05_02_100000_store_create_tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,24 +121,6 @@ public function up()
$table->foreign('loadout_id')->references('id')->on('loadouts')
->onUpdate('cascade')->onDelete('cascade');
});

// Create table for store versions
Schema::connection('store')->create('versions', function (Blueprint $table) {
$table->engine = "InnoDB";
$table->increments('id');
$table->string('mod_name',64);
$table->string('mod_description',64)->nullable();
$table->string('mod_ver_convar',64)->nullable();
$table->string('mod_ver_number',64);
$table->integer('server_id')->unsigned();
$table->timestamp('last_updated');
$table->timestamps();

$table->unique(['mod_ver_convar', 'server_id']);

$table->foreign('server_id')->references('id')->on('servers')
->onUpdate('cascade')->onDelete('cascade');
});

// Create table for store servers
Schema::connection('store')->create('servers', function (Blueprint $table) {
Expand All @@ -151,6 +133,24 @@ public function up()
$table->timestamps();
});

// Create table for store versions
Schema::connection('store')->create('versions', function (Blueprint $table) {
$table->engine = "InnoDB";
$table->increments('id');
$table->string('mod_name',64);
$table->string('mod_description',64)->nullable();
$table->string('mod_ver_convar',64)->nullable();
$table->string('mod_ver_number',64);
$table->integer('server_id')->unsigned();
$table->timestamp('last_updated');
$table->timestamps();

$table->unique(['mod_ver_convar', 'server_id']);

$table->foreign('server_id')->references('id')->on('servers')
->onUpdate('cascade')->onDelete('cascade');
});

// Create table for store server items
Schema::connection('store')->create('servers_items', function (Blueprint $table) {
$table->engine = "InnoDB";
Expand Down

0 comments on commit babea7b

Please sign in to comment.