cleanup database migrations

This commit is contained in:
2019-04-24 23:03:59 -05:00
parent 291c1cd426
commit 5110c58a7c
58 changed files with 531 additions and 1924 deletions
@@ -34,6 +34,32 @@ class CreateStructures extends Migration
$table->timestamps();
});
}
if(!Schema::hasTable('CorpStructures')) {
Schema::create('CorpStructures', function(Blueprint $table) {
$table->increments('id');
$table->integer('character_id');
$table->integer('corporation_id');
$table->string('corporation_name');
$table->string('region');
$table->string('system');
$table->string('structure_name');
$table->decimal('tax', 10, 2);
$table->string('structure_type');
$table->timestamps();
});
}
if(!Schema::hasTable('corp_tax_ratios')) {
Schema::create('corp_tax_ratios', function (Blueprint $table) {
$table->increments('id');
$table->string('corporation_id');
$table->string('corporation_name');
$table->string('structure_type');
$table->string('ratio');
$table->timestamps();
});
}
}
/**
@@ -44,5 +70,7 @@ class CreateStructures extends Migration
public function down()
{
Schema::dropIfExists('Structures');
Schema::dropIfExists('CorpStructures');
Schema::dropIfExists('corp_tax_ratios');
}
}