srp module

This commit is contained in:
2019-06-28 22:55:53 -05:00
parent cd62300547
commit 05de378cdd
7 changed files with 159 additions and 2 deletions
@@ -0,0 +1,49 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSrpTables extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('srp_ships')) {
Schema::create('srp_ships', function (Blueprint $table) {
$table->increments('id');
$table->string('ship_type');
$table->string('character_id');
$table->string('zkillboard');
$table->string('loss_values');
$table->text('notes');
});
}
if(!Schema::hasTable('srp_fleets')) {
Schema::create('srp_fleets', function(Blueprint $table) {
$table->increments('fleet_id');
$table->string('fleet_name');
$table->string('fleet_commander');
$table->string('fleet_commander_id');
$table->string('fleet_type');
$table->string('fleet_description');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('srp_ships');
Schema::dropIfExists('srp_fleets');
}
}