added mining observers table

added corp observers table
added alliance rental moon ledgers
added corp moon ledgers table
modified wiki stuff groups
This commit is contained in:
2020-05-07 01:13:18 -05:00
parent d796512f6a
commit 9561a076d7
10 changed files with 311 additions and 4 deletions

View File

@@ -0,0 +1,91 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateRentalMoonLedgerTables extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('alliance_mining_observers')) {
Schema::create('alliance_mining_observers', function(Blueprint $table) {
$table->unsignedBigIncrements('id');
$table->unsignedBigInteger('corporation_id');
$table->string('corporation_name');
$table->unsignedBigInteger('observer_id');
$table->string('observer_name');
$table->string('observer_type');
$table->dateTime('last_updated');
$table->timestamps();
});
}
if(!Schema::hasTable('alliance_rental_moon_ledgers')) {
Schema::create('alliance_rental_moon_ledgers', function(Blueprint $table) {
$table->unsignedBigIncrements('id');
$table->unsignedBigInteger('corporation_id');
$table->string('corporation_name');
$table->unsignedBigInteger('character_id');
$table->string('character_name');
$table->unsignedBigInteger('observer_id');
$table->string('observer_name');
$table->unsignedBigInteger('type_id');
$table->string('ore');
$table->unsignedBigInteger('quantity');
$table->unsignedBigInteger('recorded_corporation_id');
$table->string('record_corporation_name');
$table->dateTime('last_updated');
$table->timestamps();
});
}
if(!Schema::hasTable('corp_mining_observers')) {
Schema::create('corp_mining_observers', function(Blueprint $table) {
$table->unsignedBigIncrements('id');
$table->unsignedBigInteger('corporation_id');
$table->string('corporation_name');
$table->unsignedBigInteger('observer_id');
$table->string('observer_name');
$table->string('observer_type');
$table->dateTime('last_updated');
$table->timestamps();
});
}
if(!Schema::hasTable('corp_moon_ledgers')) {
Schema::create('corp_moon_ledgers', function(Blueprint $table) {
$table->unsignedBigIncrements('id');
$table->unsignedBigInteger('corporation_id');
$table->string('corporation_name');
$table->unsignedBigInteger('character_id');
$table->string('character_name');
$table->unsignedBigInteger('observer_id');
$table->string('observer_name');
$table->unsignedBigInteger('type_id');
$table->string('ore');
$table->unsignedBigInteger('quantity');
$table->unsignedBigInteger('recorded_corporation_id');
$table->string('record_corporation_name');
$table->dateTime('last_updated');
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('alliance_rental_moon_ledgers');
Schema::dropIfExists('corp_moon_ledgers');
}
}