added primary keys to the new db tables

This commit is contained in:
2019-05-30 00:43:06 -05:00
parent df21c42353
commit a786730ca6
6 changed files with 129 additions and 29 deletions
@@ -15,8 +15,7 @@ class CorporationAssetsTable extends Migration
{
if(!Schema::hasTable('alliance_structures')) {
Schema::create('alliance_structures', function(Blueprint $table) {
$table->increments('id');
$table->string('structure_id');
$table->string('structure_id')->primary()->unique();
$table->string('structure_name');
$table->string('solar_system_id');
$table->string('solar_system_name')->nullable();
@@ -42,7 +41,7 @@ class CorporationAssetsTable extends Migration
if(!Schema::hasTable('structure_services')) {
Schema::create('structure_services', function(Blueprint $table) {
$table->increments('id');
$table->increments('id')->primary();
$table->string('structure_id');
$table->string('name');
$table->string('state');
@@ -51,7 +50,7 @@ class CorporationAssetsTable extends Migration
if(!Schema::hasTable('alliance_assets')) {
Schema::create('alliance_assets', function(Blueprint $table) {
$table->increments('id');
$table->increments('id')->primary();
$table->boolean('is_blueprint_copy')->nullable();
$table->boolean('is_singleton');
$table->string('item_id');