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

View File

@@ -25,7 +25,6 @@ class CreateUsersTable extends Migration
$table->integer('expires_in')->default(0);
$table->string('owner_hash');
$table->string('user_type')->default('Guest');
$table->string('role')->default('Guest');
$table->text('scopes')->nullable();
$table->string('email')->unique()->nullable();
$table->timestamp('email_verified_at')->nullable();
@@ -33,6 +32,142 @@ class CreateUsersTable extends Migration
$table->timestamps();
});
}
if(!Schema::hasTable('user_roles')) {
Schema::create('user_roles', function (Blueprint $table) {
$table->increments('id');
$table->integer('character_id')->unsigned();
$table->foreign('character_id')->references('character_id')->on('users');
$table->string('role')->default('None');
$table->timestamps();
});
}
if(!Schema::hasTable('EsiTokens')) {
Schema::create('EsiTokens', function(Blueprint $table) {
$table->increments('id');
$table->integer('character_id')->unique();
$table->string('access_token');
$table->string('refresh_token');
$table->integer('expires_in');
$table->timestamps();
});
}
if(!Schema::hasTable('EsiScopes')) {
Schema::create('EsiScopes', function(Blueprint $table) {
$table->increments('id');
$table->integer('character_id');
$table->foreign('character_id')->references('character_id')->on('EsiTokens');
$table->string('scope');
$table->timestamps();
});
}
if(!Schema::hasTable('user_permissions')) {
Schema::create('user_permissions', function (Blueprint $table) {
$table->increments('id');
$table->integer('character_id')->unsigned();
$table->foreign('character_id')->references('character_id')->on('users');
$table->string('permission');
$table->timestamps();
});
}
if(!Schema::hasTable('available_user_permissions')) {
Schema::create('available_user_permissions', function(Blueprint $table) {
$table->increments('id');
$table->string('permission');
});
}
if(!Schema::hasTable('available_user_roles')) {
Schema::create('available_user_roles', function (Blueprint $table) {
$table->increments('id');
$table->string('role');
$table->string('description');
$table->timestamps();
});
DB::table('available_user_roles')->insert([
'role' => 'None',
'description' => 'User has no roles and is not allowed in the site.',
]);
DB::table('available_user_roles')->insert([
'role' => 'Guest',
'description' => 'Guest of the site.',
]);
DB::table('available_user_roles')->insert([
'role' => 'Renter',
'description' => 'Renters of W4RP.',
]);
DB::table('available_user_roles')->insert([
'role' => 'User',
'description' => 'Members of Legacy allowed on the site.',
]);
DB::table('available_user_roles')->insert([
'role' => 'Admin',
'description' => 'Admin of the site.',
]);
DB::table('available_user_roles')->insert([
'role' => 'SuperUser',
'description' => 'Super user of the site.',
]);
}
if(!Schema::hasTable('user_to_corporation')) {
Schema::create('user_to_corporation', function (Blueprint $table) {
$table->increments('id');
$table->string('character_id');
$table->string('character_name');
$table->string('corporation_id');
$table->string('corporation_name');
});
}
if(!Schema::hasTable('AllianceCorps')) {
Schema::create('AllianceCorps', function(Blueprint $table) {
$table->integer('corporation_id')->unique();
$table->string('name');
$table->timestamps();
});
}
if(!Schema::hasTable('character_to_corporation')) {
Schema::create('character_to_corporation', function (Blueprint $table) {
$table->increments('id');
$table->string('character_id');
$table->string('character_name');
$table->string('corporation_id');
$table->string('corporation_name');
});
}
if(!Schema::hasTable('corporation_to_alliance')) {
Schema::create('corporation_to_alliance', function (Blueprint $table) {
$table->increments('id');
$table->string('corporation_id');
$table->string('corporation_name');
$table->string('alliance_id');
$table->string('alliance_name');
});
}
if(!Schema::hasTable('allowed_logins')) {
Schema::create('allowed_logins', function(Blueprint $table) {
$table->increments('id');
$table->string('entity_id');
$table->string('entity_type');
$table->string('entity_name');
$table->string('login_type');
$table->timestamps();
});
}
}
/**
@@ -43,5 +178,16 @@ class CreateUsersTable extends Migration
public function down()
{
Schema::dropIfExists('users');
Schema::dropIfExists('available_user_roles');
Schema::dropIfExists('user_roles');
Schema::dropIfExists('EsiTokens');
Schema::dropIfExists('EsiScopes');
Schema::dropIfExists('available_user_permissions');
Schema::dropIfExists('user_permissions');
Schema::dropIfExists('user_to_corporation');
Schema::dropIfExists('AllianceCorps');
Schema::dropIfExists('character_to_corporation');
Schema::dropIfExists('corporation_to_alliance');
Schema::dropIfExists('allowed_logins');
}
}

View File

@@ -1,34 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePasswordResetsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('password_resets')) {
Schema::create('password_resets', function (Blueprint $table) {
$table->string('email')->index();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('password_resets');
}
}

View File

@@ -31,6 +31,22 @@ class CreateMoonsTable extends Migration
$table->integer('FourthQuantity')->default('0');
$table->string('RentalCorp')->default('Not Rented');
$table->integer('RentalEnd')->default('0');
$table->string('Paid')->default('No');
});
}
if(!Schema::hasTable('moon_rents')) {
Schema::create('moon_rents', function (Blueprint $table) {
$table->increments('id');
$table->string('System');
$table->string('Planet');
$table->string('Moon');
$table->string('RentalCorp');
$table->dateTime('RentalEnd');
$table->string('Contact');
$table->string('Price');
$table->string('Type');
$table->string('Paid');
});
}
}
@@ -43,5 +59,6 @@ class CreateMoonsTable extends Migration
public function down()
{
Schema::dropIfExists('Moons');
Schema::dropIfExists('moon_rents');
}
}

View File

@@ -1,36 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePricesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('Prices')) {
Schema::create('Prices', function (Blueprint $table) {
$table->increments('id');
$table->text('Name');
$table->integer('ItemId');
$table->decimal('Price', 20, 2);
$table->string('Time');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('Prices');
}
}

View File

@@ -1,38 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateOrepricesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('OrePrices')) {
Schema::create('OrePrices', function (Blueprint $table) {
$table->increments('id');
$table->string('Name');
$table->integer('ItemId');
$table->decimal('BatchPrice', 20,2);
$table->decimal('UnitPrice', 20, 2);
$table->decimal('m3Price', 20, 2);
$table->string('Time');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('OrePrices');
}
}

View File

@@ -21,6 +21,72 @@ class CreateConfigTable extends Migration
$table->integer('RentalTime');
});
}
if(!Schema::hasTable('ItemComposition')) {
Schema::create('ItemComposition', function (Blueprint $table) {
$table->string('Name')->unique();
$table->integer('ItemId');
$table->decimal('m3Size', 10, 2)->default(0.00);
$table->integer('BatchSize')->default(100);
$table->integer('Tritanium')->default(0);
$table->integer('Pyerite')->default(0);
$table->integer('Mexallon')->default(0);
$table->integer('Isogen')->default(0);
$table->integer('Nocxium')->default(0);
$table->integer('Zydrine')->default(0);
$table->integer('Megacyte')->default(0);
$table->integer('Morphite')->default(0);
$table->integer('HeavyWater')->default(0);
$table->integer('LiquidOzone')->default(0);
$table->integer('NitrogenIsotopes')->default(0);
$table->integer('HeliumIsotopes')->default(0);
$table->integer('HydrogenIsotopes')->default(0);
$table->integer('OxygenIsotopes')->default(0);
$table->integer('StrontiumClathrates')->default(0);
$table->integer('AtmosphericGases')->default(0);
$table->integer('EvaporiteDeposits')->default(0);
$table->integer('Hydrocarbons')->default(0);
$table->integer('Silicates')->default(0);
$table->integer('Cobalt')->default(0);
$table->integer('Scandium')->default(0);
$table->integer('Titanium')->default(0);
$table->integer('Tungsten')->default(0);
$table->integer('Cadmium')->default(0);
$table->integer('Platinum')->default(0);
$table->integer('Vanadium')->default(0);
$table->integer('Chromium')->default(0);
$table->integer('Technetium')->default(0);
$table->integer('Hafnium')->default(0);
$table->integer('Caesium')->default(0);
$table->integer('Mercury')->default(0);
$table->integer('Dysprosium')->default(0);
$table->integer('Neodymium')->default(0);
$table->integer('Promethium')->default(0);
$table->integer('Thulium')->default(0);
});
}
if(!Schema::hasTable('Prices')) {
Schema::create('Prices', function (Blueprint $table) {
$table->increments('id');
$table->text('Name');
$table->integer('ItemId');
$table->decimal('Price', 20, 2);
$table->string('Time');
});
}
if(!Schema::hasTable('OrePrices')) {
Schema::create('OrePrices', function (Blueprint $table) {
$table->increments('id');
$table->string('Name');
$table->integer('ItemId');
$table->decimal('BatchPrice', 20,2);
$table->decimal('UnitPrice', 20, 2);
$table->decimal('m3Price', 20, 2);
$table->string('Time');
});
}
}
/**
@@ -31,5 +97,8 @@ class CreateConfigTable extends Migration
public function down()
{
Schema::dropIfExists('Config');
Schema::dropIfExists('ItemComposition');
Schema::dropIfExists('Prices');
Schema::dropIfExists('OrePrices');
}
}

View File

@@ -1,70 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateItemCompositionTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('ItemComposition')) {
Schema::create('ItemComposition', function (Blueprint $table) {
$table->string('Name')->unique();
$table->integer('ItemId');
$table->decimal('m3Size', 10, 2)->default(0.00);
$table->integer('BatchSize')->default(100);
$table->integer('Tritanium')->default(0);
$table->integer('Pyerite')->default(0);
$table->integer('Mexallon')->default(0);
$table->integer('Isogen')->default(0);
$table->integer('Nocxium')->default(0);
$table->integer('Zydrine')->default(0);
$table->integer('Megacyte')->default(0);
$table->integer('Morphite')->default(0);
$table->integer('HeavyWater')->default(0);
$table->integer('LiquidOzone')->default(0);
$table->integer('NitrogenIsotopes')->default(0);
$table->integer('HeliumIsotopes')->default(0);
$table->integer('HydrogenIsotopes')->default(0);
$table->integer('OxygenIsotopes')->default(0);
$table->integer('StrontiumClathrates')->default(0);
$table->integer('AtmosphericGases')->default(0);
$table->integer('EvaporiteDeposits')->default(0);
$table->integer('Hydrocarbons')->default(0);
$table->integer('Silicates')->default(0);
$table->integer('Cobalt')->default(0);
$table->integer('Scandium')->default(0);
$table->integer('Titanium')->default(0);
$table->integer('Tungsten')->default(0);
$table->integer('Cadmium')->default(0);
$table->integer('Platinum')->default(0);
$table->integer('Vanadium')->default(0);
$table->integer('Chromium')->default(0);
$table->integer('Technetium')->default(0);
$table->integer('Hafnium')->default(0);
$table->integer('Caesium')->default(0);
$table->integer('Mercury')->default(0);
$table->integer('Dysprosium')->default(0);
$table->integer('Neodymium')->default(0);
$table->integer('Promethium')->default(0);
$table->integer('Thulium')->default(0);
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('ItemComposition');
}
}

View File

@@ -23,6 +23,23 @@ class CreateWikiUsers extends Migration
$table->unique('login', 'user');
});
}
if(!Schema::hasTable('wiki_member')) {
Schema::create('wiki_member', function(Blueprint $table) {
$table->integer('uid');
$table->integer('gid');
$table->string('groupname');
$table->primary(['uid', 'gid']);
});
}
if(!Schema::hasTable('wiki_groupnames')) {
Schema::create('wiki_groupnames', function(Blueprint $table) {
$table->increments('id');
$table->string('gname');
$table->unique('id', 'id');
});
}
}
/**
@@ -33,5 +50,7 @@ class CreateWikiUsers extends Migration
public function down()
{
Schema::dropIfExists('wiki_user');
Schema::dropIfExists('wiki_member');
Schema::dropIfExists('wiki_groupname');
}
}

View File

@@ -1,34 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateWikiGroupnames extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('wiki_groupnames')) {
Schema::create('wiki_groupnames', function(Blueprint $table) {
$table->increments('id');
$table->string('gname');
$table->unique('id', 'id');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('wiki_groupname');
}
}

View File

@@ -1,35 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateWikiMember extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('wiki_member')) {
Schema::create('wiki_member', function(Blueprint $table) {
$table->integer('uid');
$table->integer('gid');
$table->string('groupname');
$table->primary(['uid', 'gid']);
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('wiki_member');
}
}

View File

@@ -1,42 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMarketOrders extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('MarketOrders')) {
Schema::create('MarketOrders', function(Blueprint $table) {
$table->integer('duration');
$table->boolean('is_buy_order');
$table->dateTime('issued');
$table->integer('location_id');
$table->integer('min_volume');
$table->integer('order_id')->unique();
$table->decimal('price', 20, 2);
$table->string('range');
$table->integer('system_id');
$table->integer('volume_remain');
$table->integer('volume_total');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('MarketOrders');
}
}

View File

@@ -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');
}
}

View File

@@ -1,44 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateHoldingCorpFinancesJournal extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('HoldingCorpFinancesJournal')) {
Schema::create('HoldingCorpFinancesJournal', function(Blueprint $table) {
$table->integer('id')->unique();
$table->decimal('amount', 20, 2);
$table->decimal('balance', 20, 2);
$table->integer('context_id');
$table->string('context_id_type');
$table->dateTime('date');
$table->string('description');
$table->integer('first_party_id')->nullable();
$table->string('reason')->nullabe();
$table->string('ref_type');
$table->integer('second_party_id')->nullable();
$table->decimal('tax', 20, 2)->default(0.00);
$table->integer('tax_receiver_id')->nullable();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('HoldingcorpFinancesJournal');
}
}

View File

@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateEsiTokens extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('EsiTokens')) {
Schema::create('EsiTokens', function(Blueprint $table) {
$table->increments('id');
$table->integer('character_id')->unique();
$table->string('access_token');
$table->string('refresh_token');
$table->integer('expires_in');
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('EsiTokens');
}
}

View File

@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUserRolesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('user_roles')) {
Schema::create('user_roles', function (Blueprint $table) {
$table->increments('id');
$table->integer('character_id')->unsigned();
$table->foreign('character_id')->references('character_id')->on('users');
$table->string('role')->default('None');
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('user_roles');
}
}

View File

@@ -1,36 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateEsiScopes extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('EsiScopes')) {
Schema::create('EsiScopes', function(Blueprint $table) {
$table->increments('id');
$table->integer('character_id');
$table->foreign('character_id')->references('character_id')->on('EsiTokens');
$table->string('scope');
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('EsiScopes');
}
}

View File

@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFleetsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('Fleets')) {
Schema::create('Fleets', function (Blueprint $table) {
$table->increments('id');
$table->string('character_id');
$table->string('fleet')->unique();
$table->text('description')->nullable();
$table->dateTime('creation_time');
$table->dateTime('fleet_end');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('Fleets');
}
}

View File

@@ -1,34 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class DropRolesColumnUserTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function(Blueprint $table) {
$table->dropColumn('role');
$table->dropColumn('scopes');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function(Blueprint $table) {
$table->string('role')->default('Guest');
$table->text('scopes')->nullable();
});
}
}

View File

@@ -33,6 +33,203 @@ class CreateCorpJournal extends Migration
$table->timestamps();
});
}
if(!Schema::hasTable('HoldingCorpFinancesJournal')) {
Schema::create('HoldingCorpFinancesJournal', function(Blueprint $table) {
$table->integer('id')->unique();
$table->decimal('amount', 20, 2);
$table->decimal('balance', 20, 2);
$table->integer('context_id');
$table->string('context_id_type');
$table->dateTime('date');
$table->string('description');
$table->integer('first_party_id')->nullable();
$table->string('reason')->nullabe();
$table->string('ref_type');
$table->integer('second_party_id')->nullable();
$table->decimal('tax', 20, 2)->default(0.00);
$table->integer('tax_receiver_id')->nullable();
});
}
if(!Schema::hasTable('jump_bridge_journal')) {
Schema::create('jump_bridge_journal', function(Blueprint $table) {
$table->string('id')->unique();
$table->integer('corporation_id')->nullabe();
$table->integer('division')->default(0);
$table->decimal('amount', 20, 2)->nullable();
$table->decimal('balance', 20, 2)->nullable();
$table->bigInteger('context_id')->nullable();
$table->string('context_id_type')->nullable();
$table->dateTime('date')->nullabe();
$table->string('description')->nullabe();
$table->integer('first_party_id')->nullable();
$table->string('reason')->default(' ');
$table->string('ref_type')->nullabe();
$table->integer('second_party_id')->nullable();
$table->decimal('tax', 20, 2)->default(0.00);
$table->integer('tax_receiver_id')->nullable();
$table->timestamps();
});
}
if(!Schema::hasTable('corp_market_journal')) {
Schema::create('corp_market_journal', function(Blueprint $table) {
$table->string('id')->unique();
$table->integer('corporation_id')->nullabe();
$table->integer('division')->default(0);
$table->decimal('amount', 20, 2)->nullable();
$table->decimal('balance', 20, 2)->nullable();
$table->bigInteger('context_id')->nullable();
$table->string('context_id_type')->nullable();
$table->dateTime('date')->nullabe();
$table->string('description')->nullabe();
$table->integer('first_party_id')->nullable();
$table->string('reason')->default(' ');
$table->string('ref_type')->nullabe();
$table->integer('second_party_id')->nullable();
$table->decimal('tax', 20, 2)->default(0.00);
$table->integer('tax_receiver_id')->nullable();
$table->timestamps();
});
}
if(!Schema::hasTable('player_donation_journal')) {
Schema::create('player_donation_journal', function(Blueprint $table) {
$table->string('id')->unique();
$table->integer('corporation_id')->nullabe();
$table->integer('division')->default(0);
$table->decimal('amount', 20, 2)->nullable();
$table->decimal('balance', 20, 2)->nullable();
$table->bigInteger('context_id')->nullable();
$table->string('context_id_type')->nullable();
$table->dateTime('date')->nullabe();
$table->string('description')->nullabe();
$table->integer('first_party_id')->nullable();
$table->string('reason')->default(' ');
$table->string('ref_type')->nullabe();
$table->integer('second_party_id')->nullable();
$table->decimal('tax', 20, 2)->default(0.00);
$table->integer('tax_receiver_id')->nullable();
$table->timestamps();
});
}
if(!Schema::hasTable('reprocessing_tax_journal')) {
Schema::create('reprocessing_tax_journal', function(Blueprint $table) {
$table->string('id')->unique();
$table->integer('corporation_id')->nullabe();
$table->integer('division')->default(0);
$table->decimal('amount', 20, 2)->nullable();
$table->decimal('balance', 20, 2)->nullable();
$table->integer('context_id')->nullable();
$table->string('context_id_type')->nullable();
$table->dateTime('date')->nullabe();
$table->string('description')->nullabe();
$table->integer('first_party_id')->nullable();
$table->string('reason')->default(' ');
$table->string('ref_type')->nullabe();
$table->integer('second_party_id')->nullable();
$table->decimal('tax', 20, 2)->default(0.00);
$table->integer('tax_receiver_id')->nullable();
$table->timestamps();
});
}
if(!Schema::hasTable('office_fees_journal')) {
Schema::create('office_fees_journal', function(Blueprint $table) {
$table->string('id')->unique();
$table->integer('corporation_id')->nullabe();
$table->integer('division')->default(0);
$table->decimal('amount', 20, 2)->nullable();
$table->decimal('balance', 20, 2)->nullable();
$table->integer('context_id')->nullable();
$table->string('context_id_type')->nullable();
$table->dateTime('date')->nullabe();
$table->string('description')->nullabe();
$table->integer('first_party_id')->nullable();
$table->string('reason')->default(' ');
$table->string('ref_type')->nullabe();
$table->integer('second_party_id')->nullable();
$table->decimal('tax', 20, 2)->default(0.00);
$table->integer('tax_receiver_id')->nullable();
$table->timestamps();
});
}
if(!Schema::hasTable('structure_industry_tax_journal')) {
Schema::create('structure_industry_tax_journal', function(Blueprint $table) {
$table->string('id')->unique();
$table->integer('corporation_id')->nullabe();
$table->integer('division')->default(0);
$table->decimal('amount', 20, 2)->nullable();
$table->decimal('balance', 20, 2)->nullable();
$table->integer('context_id')->nullable();
$table->string('context_id_type')->nullable();
$table->dateTime('date')->nullabe();
$table->string('description')->nullabe();
$table->integer('first_party_id')->nullable();
$table->string('reason')->default(' ');
$table->string('ref_type')->nullabe();
$table->integer('second_party_id')->nullable();
$table->decimal('tax', 20, 2)->default(0.00);
$table->integer('tax_receiver_id')->nullable();
$table->timestamps();
});
}
if(!Schema::hasTable('planet_production_tax_journal')) {
Schema::create('planet_production_tax_journal', function(Blueprint $table) {
$table->string('id')->unique();
$table->integer('corporation_id')->nullabe();
$table->integer('division')->default(0);
$table->decimal('amount', 20, 2)->nullable();
$table->decimal('balance', 20, 2)->nullable();
$table->integer('context_id')->nullable();
$table->string('context_id_type')->nullable();
$table->dateTime('date')->nullabe();
$table->string('description')->nullabe();
$table->integer('first_party_id')->nullable();
$table->string('reason')->default(' ');
$table->string('ref_type')->nullabe();
$table->integer('second_party_id')->nullable();
$table->decimal('tax', 20, 2)->default(0.00);
$table->integer('tax_receiver_id')->nullable();
$table->timestamps();
});
}
if(!Schema::hasTable('monthly_market_taxes')) {
Schema::create('monthly_market_taxes', function (Blueprint $table) {
$table->increments('id');
$table->string('character_id');
$table->string('character_name');
$table->string('corporation_id');
$table->string('corporation_name');
$table->decimal('tax_owed', 20, 2);
$table->string('month');
$table->string('year');
$table->timestamps();
});
}
if(!Schema::hasTable('pi_sale_journal')) {
Schema::create('pi_sale_journal', function(Blueprint $table) {
$table->string('id')->unique();
$table->integer('corp_id');
$table->integer('division');
$table->integer('client_id');
$table->string('date');
$table->boolean('is_buy');
$table->integer('journal_ref_id');
$table->integer('location_id');
$table->integer('quantity');
$table->integer('transaction_id');
$table->integer('type_id');
$table->decimal('unit_price');
$table->timestamps();
});
}
}
/**
@@ -43,5 +240,15 @@ class CreateCorpJournal extends Migration
public function down()
{
Schema::dropIfExists('CorpWalletJournals');
Schema::dropIfExists('HoldingcorpFinancesJournal');
Schema::dropIfExists('jump_bridge_journal');
Schema::dropIfExists('corp_market_journal');
Schema::dropIfExists('player_donation_journal');
Schema::dropIfExists('reprocessing_tax_journal');
Schema::dropIfExists('office_fees_journal');
Schema::dropIfExists('structure_industry_tax');
Schema::dropIfExists('planet_production_tax_journal');
Schema::dropIfExists('monthly_market_taxes');
Schema::dropIfExists('pi_sale_journal');
}
}

View File

@@ -1,34 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAllianceCorps extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('AllianceCorps')) {
Schema::create('AllianceCorps', function(Blueprint $table) {
$table->integer('corporation_id')->unique();
$table->string('name');
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('AllianceCorps');
}
}

View File

@@ -1,41 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCorpStructures extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
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();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('CorpStructures');
}
}

View File

@@ -1,36 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateScheduleJobs extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('schedule_jobs')) {
Schema::create('schedule_jobs', function(Blueprint $table) {
$table->increments('id');
$table->string('job_name');
$table->string('job_state');
$table->dateTime('system_time');
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('schedule_jobs');
}
}

View File

@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUserPermissionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('user_permissions')) {
Schema::create('user_permissions', function (Blueprint $table) {
$table->increments('id');
$table->integer('character_id')->unsigned();
$table->foreign('character_id')->references('character_id')->on('users');
$table->string('permission');
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('user_permissions');
}
}

View File

@@ -1,44 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateLogisticsContractsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('logistics_contracts')) {
Schema::create('logistics_contracts', function (Blueprint $table) {
$table->increments('id');
$table->integer('shipper_id')->nullable();
$table->string('shipper_name')->nullable();
$table->integer('accepted_by_id')->nullable();
$table->string('accepted_by_name')->nullable();
$table->integer('start_system_id')->nullable();
$table->string('start_system_name')->nullable();
$table->integer('destination_system_id')->nullable();
$table->string('destination_system_name')->nullable();
$table->decimal('price', 20, 2)->default(0.00);
$table->decimal('collateral', 20, 2)->default(0.00);
$table->boolean('insured')->default(false);
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('logistics_contracts');
}
}

View File

@@ -1,43 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFleetsActivityTrackingTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('fleets_activity_tracking')) {
Schema::create('fleets_activity_tracking', function (Blueprint $table) {
$table->increments('id');
$table->string('fleetId');
$table->string('character_id');
$table->string('character_name')->nullable();
$table->string('corporation_id');
$table->string('corporation_name')->nullable();
$table->string('region');
$table->string('system');
$table->string('ship');
$table->string('ship_type')->nullable();
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('fleets_activity_tracking');
}
}

View File

@@ -1,34 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class DropFleetEndColumnFleetsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(Schema::hasColumn('Fleets', 'fleet_end')) {
Schema::table('Fleets', function($table) {
$table->dropColumn('fleet_end');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('Fleets', function($table) {
$table->dateTime('fleet_end');
});
}
}

View File

@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUserToCorporationTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('user_to_corporation')) {
Schema::create('user_to_corporation', function (Blueprint $table) {
$table->increments('id');
$table->string('character_id');
$table->string('character_name');
$table->string('corporation_id');
$table->string('corporation_name');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('user_to_corporation');
}
}

View File

@@ -1,28 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class DropStructuresTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::dropIfExists('Structures');
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}

View File

@@ -1,40 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMonthlyMarketTaxesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('monthly_market_taxes')) {
Schema::create('monthly_market_taxes', function (Blueprint $table) {
$table->increments('id');
$table->string('character_id');
$table->string('character_name');
$table->string('corporation_id');
$table->string('corporation_name');
$table->decimal('tax_owed', 20, 2);
$table->string('month');
$table->string('year');
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('monthly_market_taxes');
}
}

View File

@@ -1,47 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePlayerDonationJournalsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('PlayerDonationJournals')) {
Schema::create('PlayerDonationJournals', function(Blueprint $table) {
$table->string('id')->unique();
$table->integer('corporation_id')->nullabe();
$table->integer('division')->default(0);
$table->decimal('amount', 20, 2)->nullable();
$table->decimal('balance', 20, 2)->nullable();
$table->integer('context_id')->nullable();
$table->string('context_id_type')->nullable();
$table->dateTime('date')->nullabe();
$table->string('description')->nullabe();
$table->integer('first_party_id')->nullable();
$table->string('reason')->default(' ');
$table->string('ref_type')->nullabe();
$table->integer('second_party_id')->nullable();
$table->decimal('tax', 20, 2)->default(0.00);
$table->integer('tax_receiver_id')->nullable();
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('PlayerDonationJournals');
}
}

View File

@@ -1,28 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class DropHoldingCorpFinancesJournalTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::dropIfExists('HoldingCorpFinancesJournal');
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}

View File

@@ -1,33 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAvailablePermissions extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('available_user_permissions')) {
Schema::create('available_user_permissions', function(Blueprint $table) {
$table->increments('id');
$table->string('permission');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('available_user_permissions');
}
}

View File

@@ -1,47 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateJumpBridgeJournal extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('jump_bridge_journal')) {
Schema::create('jump_bridge_journal', function(Blueprint $table) {
$table->string('id')->unique();
$table->integer('corporation_id')->nullabe();
$table->integer('division')->default(0);
$table->decimal('amount', 20, 2)->nullable();
$table->decimal('balance', 20, 2)->nullable();
$table->bigInteger('context_id')->nullable();
$table->string('context_id_type')->nullable();
$table->dateTime('date')->nullabe();
$table->string('description')->nullabe();
$table->integer('first_party_id')->nullable();
$table->string('reason')->default(' ');
$table->string('ref_type')->nullabe();
$table->integer('second_party_id')->nullable();
$table->decimal('tax', 20, 2)->default(0.00);
$table->integer('tax_receiver_id')->nullable();
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('jump_bridge_journal');
}
}

View File

@@ -1,47 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCorpMarketJournal extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('corp_market_journal')) {
Schema::create('corp_market_journal', function(Blueprint $table) {
$table->string('id')->unique();
$table->integer('corporation_id')->nullabe();
$table->integer('division')->default(0);
$table->decimal('amount', 20, 2)->nullable();
$table->decimal('balance', 20, 2)->nullable();
$table->bigInteger('context_id')->nullable();
$table->string('context_id_type')->nullable();
$table->dateTime('date')->nullabe();
$table->string('description')->nullabe();
$table->integer('first_party_id')->nullable();
$table->string('reason')->default(' ');
$table->string('ref_type')->nullabe();
$table->integer('second_party_id')->nullable();
$table->decimal('tax', 20, 2)->default(0.00);
$table->integer('tax_receiver_id')->nullable();
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('corp_market_journal');
}
}

View File

@@ -1,47 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePlayerDonationJournal extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('player_donation_journal')) {
Schema::create('player_donation_journal', function(Blueprint $table) {
$table->string('id')->unique();
$table->integer('corporation_id')->nullabe();
$table->integer('division')->default(0);
$table->decimal('amount', 20, 2)->nullable();
$table->decimal('balance', 20, 2)->nullable();
$table->bigInteger('context_id')->nullable();
$table->string('context_id_type')->nullable();
$table->dateTime('date')->nullabe();
$table->string('description')->nullabe();
$table->integer('first_party_id')->nullable();
$table->string('reason')->default(' ');
$table->string('ref_type')->nullabe();
$table->integer('second_party_id')->nullable();
$table->decimal('tax', 20, 2)->default(0.00);
$table->integer('tax_receiver_id')->nullable();
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('player_donation_journal');
}
}

View File

@@ -1,47 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateReprocessingTaxJournal extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('reprocessing_tax_journal')) {
Schema::create('reprocessing_tax_journal', function(Blueprint $table) {
$table->string('id')->unique();
$table->integer('corporation_id')->nullabe();
$table->integer('division')->default(0);
$table->decimal('amount', 20, 2)->nullable();
$table->decimal('balance', 20, 2)->nullable();
$table->integer('context_id')->nullable();
$table->string('context_id_type')->nullable();
$table->dateTime('date')->nullabe();
$table->string('description')->nullabe();
$table->integer('first_party_id')->nullable();
$table->string('reason')->default(' ');
$table->string('ref_type')->nullabe();
$table->integer('second_party_id')->nullable();
$table->decimal('tax', 20, 2)->default(0.00);
$table->integer('tax_receiver_id')->nullable();
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('reprocessing_tax_journal');
}
}

View File

@@ -1,36 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCharacterToCorporationTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('character_to_corporation')) {
Schema::create('character_to_corporation', function (Blueprint $table) {
$table->increments('id');
$table->string('character_id');
$table->string('character_name');
$table->string('corporation_id');
$table->string('corporation_name');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('character_to_corporation');
}
}

View File

@@ -1,36 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCorporationToAllianceTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('corporation_to_alliance')) {
Schema::create('corporation_to_alliance', function (Blueprint $table) {
$table->increments('id');
$table->string('corporation_id');
$table->string('corporation_name');
$table->string('alliance_id');
$table->string('alliance_name');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('corporation_to_alliance');
}
}

View File

@@ -24,7 +24,27 @@ class CreateJobsTable extends Migration
$table->unsignedInteger('created_at');
});
}
if(!Schema::hasTable('failed_jobs')) {
Schema::create('failed_jobs', function (Blueprint $table) {
$table->bigIncrements('id');
$table->text('connection');
$table->text('queue');
$table->longText('payload');
$table->longText('exception');
$table->timestamp('failed_at')->useCurrent();
});
}
if(!Schema::hasTable('schedule_jobs')) {
Schema::create('schedule_jobs', function(Blueprint $table) {
$table->increments('id');
$table->string('job_name');
$table->string('job_state');
$table->dateTime('system_time');
$table->timestamps();
});
}
}
/**
@@ -35,5 +55,7 @@ class CreateJobsTable extends Migration
public function down()
{
Schema::dropIfExists('jobs');
Schema::dropIfExists('failed_jobs');
Schema::dropIfExists('schedule_jobs');
}
}

View File

@@ -24,6 +24,17 @@ class CreateEveMailsTable extends Migration
$table->timestamps();
});
}
if(!Schema::hasTable('sent_mails')) {
Schema::create('sent_mails', function (Blueprint $table) {
$table->increments('id');
$table->string('sender');
$table->string('subject');
$table->text('body');
$table->string('recipient');
$table->string('recipient_type');
});
}
}
/**
@@ -34,5 +45,6 @@ class CreateEveMailsTable extends Migration
public function down()
{
Schema::dropIfExists('eve_mails');
Schema::dropIfExists('sent_mails');
}
}

View File

@@ -1,47 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateStructureIndustryTaxTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('structure_industry_tax_journal')) {
Schema::create('structure_industry_tax_journal', function(Blueprint $table) {
$table->string('id')->unique();
$table->integer('corporation_id')->nullabe();
$table->integer('division')->default(0);
$table->decimal('amount', 20, 2)->nullable();
$table->decimal('balance', 20, 2)->nullable();
$table->integer('context_id')->nullable();
$table->string('context_id_type')->nullable();
$table->dateTime('date')->nullabe();
$table->string('description')->nullabe();
$table->integer('first_party_id')->nullable();
$table->string('reason')->default(' ');
$table->string('ref_type')->nullabe();
$table->integer('second_party_id')->nullable();
$table->decimal('tax', 20, 2)->default(0.00);
$table->integer('tax_receiver_id')->nullable();
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('structure_industry_tax');
}
}

View File

@@ -1,48 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePlanetProductionTaxJournal extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('planet_production_tax_journal')) {
Schema::create('planet_production_tax_journal', function(Blueprint $table) {
$table->string('id')->unique();
$table->integer('corporation_id')->nullabe();
$table->integer('division')->default(0);
$table->decimal('amount', 20, 2)->nullable();
$table->decimal('balance', 20, 2)->nullable();
$table->integer('context_id')->nullable();
$table->string('context_id_type')->nullable();
$table->dateTime('date')->nullabe();
$table->string('description')->nullabe();
$table->integer('first_party_id')->nullable();
$table->string('reason')->default(' ');
$table->string('ref_type')->nullabe();
$table->integer('second_party_id')->nullable();
$table->decimal('tax', 20, 2)->default(0.00);
$table->integer('tax_receiver_id')->nullable();
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('planet_production_tax_journal');
}
}

View File

@@ -1,47 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateOfficeFeesJournal extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('office_fees_journal')) {
Schema::create('office_fees_journal', function(Blueprint $table) {
$table->string('id')->unique();
$table->integer('corporation_id')->nullabe();
$table->integer('division')->default(0);
$table->decimal('amount', 20, 2)->nullable();
$table->decimal('balance', 20, 2)->nullable();
$table->integer('context_id')->nullable();
$table->string('context_id_type')->nullable();
$table->dateTime('date')->nullabe();
$table->string('description')->nullabe();
$table->integer('first_party_id')->nullable();
$table->string('reason')->default(' ');
$table->string('ref_type')->nullabe();
$table->integer('second_party_id')->nullable();
$table->decimal('tax', 20, 2)->default(0.00);
$table->integer('tax_receiver_id')->nullable();
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('office_fees_journal');
}
}

View File

@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAllowedLoginsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('allowed_logins')) {
Schema::create('allowed_logins', function(Blueprint $table) {
$table->increments('id');
$table->string('entity_id');
$table->string('entity_type');
$table->string('entity_name');
$table->string('login_type');
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('allowed_logins');
}
}

View File

@@ -1,32 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class DropUsersRoleColumn extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(Schema::hasColumn('users', 'role')) {
Schema::table('users', function($table) {
$table->dropColumn('role');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}

View File

@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersRoleTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('user_roles')) {
Schema::create('user_roles', function (Blueprint $table) {
$table->increments('id');
$table->integer('character_id')->unsigned();
$table->foreign('character_id')->references('character_id')->on('users');
$table->string('role')->default('None');
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('user_roles');
}
}

View File

@@ -1,35 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFailedJobsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('failed_jobs', function (Blueprint $table) {
$table->bigIncrements('id');
$table->text('connection');
$table->text('queue');
$table->longText('payload');
$table->longText('exception');
$table->timestamp('failed_at')->useCurrent();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('failed_jobs');
}
}

View File

@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCorpTaxRatiosTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
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();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('corp_tax_ratios');
}
}

View File

@@ -22,6 +22,14 @@ class CreateClonesTable extends Migration
});
}
if(!Schema::hasTable('clones_mailing')) {
Schema::create('clones_mailing', function (Blueprint $table) {
$table->increments('id');
$table->string('character_id');
$table->integer('time_sent');
$table->timestamps();
});
}
}
/**
@@ -32,5 +40,6 @@ class CreateClonesTable extends Migration
public function down()
{
Schema::dropIfExists('clones');
Schema::dropIfExists('clones_mailing');
}
}

View File

@@ -1,33 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateClonesMailingTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('clones_mailing', function (Blueprint $table) {
$table->increments('id');
$table->string('character_id');
$table->integer('time_sent');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('clones_mailing');
}
}

View File

@@ -1,33 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class DropPlayerdonationjournalTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::dropIfExists('PlayerDonationJournal');
Schema::dropIfExists('MarketOrders');
Schema::dropIfExists('help_desk_ticket');
Schema::dropIfExists('help_desk_tickets');
Schema::dropIfExists('help_desk_ticket_responses');
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}

View File

@@ -1,65 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAvailableUserRolesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('available_user_roles')) {
Schema::create('available_user_roles', function (Blueprint $table) {
$table->increments('id');
$table->string('role');
$table->string('description');
$table->timestamps();
});
DB::table('available_user_roles')->insert([
'role' => 'None',
'description' => 'User has no roles and is not allowed in the site.',
]);
DB::table('available_user_roles')->insert([
'role' => 'Guest',
'description' => 'Guest of the site.',
]);
DB::table('available_user_roles')->insert([
'role' => 'Renter',
'description' => 'Renters of W4RP.',
]);
DB::table('available_user_roles')->insert([
'role' => 'User',
'description' => 'Members of Legacy allowed on the site.',
]);
DB::table('available_user_roles')->insert([
'role' => 'Admin',
'description' => 'Admin of the site.',
]);
DB::table('available_user_roles')->insert([
'role' => 'SuperUser',
'description' => 'Super user of the site.',
]);
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('available_user_roles');
}
}

View File

@@ -1,38 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMoonRentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('moon_rents', function (Blueprint $table) {
$table->increments('id');
$table->string('System');
$table->string('Planet');
$table->string('Moon');
$table->string('RentalCorp');
$table->dateTime('RentalEnd');
$table->string('Contact');
$table->string('Price');
$table->string('Type');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('moon_rents');
}
}

View File

@@ -1,32 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class DropCorpStructuresTaxColumnTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(Schema::hasColumn('CorpStructures', 'tax')) {
Schema::table('CorpStructures', function($table) {
$table->dropColumn('tax');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}

View File

@@ -1,35 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSentMailsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('sent_mails', function (Blueprint $table) {
$table->increments('id');
$table->string('sender');
$table->string('subject');
$table->text('body');
$table->string('recipient');
$table->string('recipient_type');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('sent_mails');
}
}

View File

@@ -1,32 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class UpdateMoonRentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('moon_rents')) {
Schema::create('moon_rents', function(Blueprint $table) {
$table->string('Paid');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}

View File

@@ -1,44 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePiSaleJournalsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('pi_sale_journal')) {
Schema::create('pi_sale_journal', function(Blueprint $table) {
$table->string('id')->unique();
$table->integer('corp_id');
$table->integer('division');
$table->integer('client_id');
$table->string('date');
$table->boolean('is_buy');
$table->integer('journal_ref_id');
$table->integer('location_id');
$table->integer('quantity');
$table->integer('transaction_id');
$table->integer('type_id');
$table->decimal('unit_price');
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('pi_sale_journal');
}
}

View File

@@ -1,34 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class ModifyMoonsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(Schema::hasTable('Moons')) {
Schema::table('Moons', function (Blueprint $table) {
$table->string('Paid');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('Moons', function (Blueprint $table) {
$table->dropColumn('Paid');
});
}
}