diff --git a/database/migrations/2018_10_06_220248_create_moons_table.php b/database/migrations/2018_10_06_220248_create_moons_table.php deleted file mode 100644 index a4b25014c..000000000 --- a/database/migrations/2018_10_06_220248_create_moons_table.php +++ /dev/null @@ -1,67 +0,0 @@ -increments('id'); - $table->string('Region'); - $table->string('System'); - $table->string('Planet'); - $table->string('Moon'); - $table->unsignedBigInteger('StructureId')->nullable(); - $table->string('StructureName')->default('No Name'); - $table->string('FirstOre')->default('None'); - $table->integer('FirstQuantity')->default('0'); - $table->string('SecondOre')->default('None'); - $table->integer('SecondQuantity')->default('0'); - $table->string('ThirdOre')->default('None'); - $table->integer('ThirdQuantity')->default('0'); - $table->string('FourthOre')->default('None'); - $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->unsignedBigInteger('StructureId')->nullable(); - $table->string('RentalCorp'); - $table->dateTime('RentalEnd'); - $table->string('Contact'); - $table->string('Price'); - $table->string('Type'); - $table->string('Paid'); - $table->string('Paid_Until')->nullable(); - }); - } - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('Moons'); - Schema::dropIfExists('moon_rents'); - } -} diff --git a/database/migrations/2018_10_28_204313_create_structures.php b/database/migrations/2018_10_28_204313_create_structures.php deleted file mode 100644 index cd6f337bc..000000000 --- a/database/migrations/2018_10_28_204313_create_structures.php +++ /dev/null @@ -1,99 +0,0 @@ -integer('corporation_id'); - $table->dateTime('fuel_expires'); - $table->dateTime('next_reinforce_apply'); - $table->integer('next_reinforce_hour'); - $table->integer('next_reinforce_weekday'); - $table->integer('profile_id'); - $table->integer('reinforce_hour'); - $table->integer('reinforce_weekday'); - $table->dateTime('services'); - $table->string('state'); - $table->date('state_timer_end'); - $table->date('state_timer_start'); - $table->integer('structure_id')->unique(); - $table->integer('system_id'); - $table->integer('type_id'); - $table->dateTime('unanchors_at'); - $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(); - }); - } - - if(!Schema::hasTable('alliance_flex_structures')) { - Schema::create('alliance_flex_structures', function (Blueprint $table) { - $table->bigIncrements('id'); - $table->unsignedBigInteger('requestor_id'); - $table->string('requestor_name'); - $table->unsignedBigInteger('requestor_corp_id'); - $table->string('requestor_corp_name'); - $table->unsignedBigInteger('system_id'); - $table->string('system'); - $table->enum('structure_type', [ - 'Cyno Jammer', - 'Cyno Beacon', - 'Jump Bridge', - 'Super Construction Facilities', - 'Market', - ]); - $table->double('structure_cost', 20, 2); - $table->dateTime('paid_until'); - $table->timestamps(); - }); - } - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('Structures'); - Schema::dropIfExists('CorpStructures'); - Schema::dropIfExists('corp_tax_ratios'); - Schema::dropIfExists('flex_structures'); - } -} diff --git a/database/migrations/2018_11_17_053307_create_corp_journal.php b/database/migrations/2018_11_17_053307_create_corp_journal.php deleted file mode 100644 index fbc07245d..000000000 --- a/database/migrations/2018_11_17_053307_create_corp_journal.php +++ /dev/null @@ -1,310 +0,0 @@ -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('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('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(); - }); - } - - if(!Schema::hasTable('alliance_market_journal')) { - Schema::create('alliance_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('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('corp_market_structures')) { - Schema::create('corp_market_structures', function(Blueprint $table) { - $table->increments('id'); - $table->unsignedInteger('character_id'); - $table->unsignedInteger('corporation_id'); - $table->decimal('tax', 5, 2); - $table->decimal('ratio', 5, 2); - $table->timestamps(); - }); - } - - if(!Schema::hasTable('sov_bill_journal')) { - Schema::create('sov_bill_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('CorpWalletJournals'); - Schema::dropIfExists('HoldingcorpFinancesJournal'); - Schema::dropIfExists('jump_bridge_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'); - Schema::dropIfExists('alliance_market_journal'); - Schema::dropIfExists('corp_market_journal'); - Schema::dropIfExists('corp_market_structures'); - Schema::dropIfExists('sov_bill_journal'); - } -} diff --git a/database/migrations/2019_04_24_000001_create_contracts_table.php b/database/migrations/2019_04_24_000001_create_contracts_table.php deleted file mode 100644 index ec455328d..000000000 --- a/database/migrations/2019_04_24_000001_create_contracts_table.php +++ /dev/null @@ -1,66 +0,0 @@ -increments('contract_id')->unique(); - $table->string('title'); - $table->string('type'); - $table->date('end_date'); - $table->text('body'); - $table->boolean('finished')->default(false); - $table->decimal('final_cost', 20, 2)->nullable(); - $table->timestamps(); - }); - } - - if(!Schema::hasTable('contract_bids')) { - Schema::create('contract_bids', function(Blueprint $table) { - $table->increments('id')->unique(); - $table->integer('contract_id'); - $table->decimal('bid_amount', 20, 2); - $table->string('character_name'); - $table->string('character_id'); - $table->string('corporation_name'); - $table->string('corporation_id'); - $table->text('notes'); - $table->timestamps(); - }); - } - - if(!Schema::hasTable('accepted_bids')) { - Schema::create('accepted_bids', function(Blueprint $table) { - $table->increments('id'); - $table->integer('contract_id'); - $table->integer('bid_id'); - $table->decimal('bid_amount', 20, 2); - $table->text('notes')->default(null); - $table->timestamps(); - }); - } - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('contracts'); - Schema::dropIfExists('contract_bids'); - Schema::dropIfExists('accepted_bids'); - } -} diff --git a/database/migrations/2019_05_04_00000_create_job_process_wallet_journal.php b/database/migrations/2019_05_04_00000_create_job_process_wallet_journal.php deleted file mode 100644 index 8f9446bad..000000000 --- a/database/migrations/2019_05_04_00000_create_job_process_wallet_journal.php +++ /dev/null @@ -1,36 +0,0 @@ -increments('id')->unique(); - $table->string('charId'); - $table->string('division'); - $table->integer('page'); - $table->timestamps(); - }); - } - } - - /** - * Reverse the migration - * - * @return void - */ - public function down() { - Schema::dropIfExists('job_process_wallet_journal'); - } -} - -?> \ No newline at end of file diff --git a/database/migrations/2019_09_02_052731_create_alliance_anchor_structure_table.php b/database/migrations/2019_09_02_052731_create_alliance_anchor_structure_table.php deleted file mode 100644 index df12d8a3e..000000000 --- a/database/migrations/2019_09_02_052731_create_alliance_anchor_structure_table.php +++ /dev/null @@ -1,51 +0,0 @@ -bigIncrements('id'); - $table->unsignedInteger('corporation_id'); - $table->string('corporation_name'); - $table->string('system'); - $table->enum('structure_size', [ - 'M', - 'L', - 'XL', - ]); - $table->enum('structure_type', [ - 'Flex', - 'Citadel', - 'Engineering', - 'Refinery', - ]); - $table->dateTime('requested_drop_time'); - $table->unsignedInteger('requester_id'); - $table->string('requester'); - $table->timestamps(); - }); - } - - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('alliance_anchor_structure'); - } -} diff --git a/database/migrations/2020_01_31_035653_create_alliance_moons_table.php b/database/migrations/2020_01_31_035653_create_alliance_moons_table.php deleted file mode 100644 index 79dd23933..000000000 --- a/database/migrations/2020_01_31_035653_create_alliance_moons_table.php +++ /dev/null @@ -1,77 +0,0 @@ -unsignedBigInteger('id')->unique(); - $table->string('Region'); - $table->string('System'); - $table->string('Planet'); - $table->string('Moon'); - $table->string('Corporation'); - $table->string('StructureName')->default('No Name'); - $table->string('FirstOre')->default('None'); - $table->integer('FirstQuantity')->default('0'); - $table->string('SecondOre')->default('None'); - $table->integer('SecondQuantity')->default('0'); - $table->string('ThirdOre')->default('None'); - $table->integer('ThirdQuantity')->default('0'); - $table->string('FourthOre')->default('None'); - $table->integer('FourthQuantity')->default('0'); - $table->string('MoonType'); - $table->enum('Availability', [ - 'Available', - 'Request Pending', - 'Reserved', - 'Deployed', - ])->default('Available'); - }); - } - - if(!Schema::hasTable('alliance_moon_requests')) { - Schema::create('alliance_moon_requests', function (Blueprint $table) { - $table->bigIncrements('id'); - $table->string('region'); - $table->string('system'); - $table->string('planet'); - $table->string('moon'); - $table->string('corporation_name'); - $table->string('corporation_ticker'); - $table->unsignedBigInteger('corporation_id'); - $table->string('requestor_name'); - $table->unsignedBigInteger('requestor_id'); - $table->string('approver_name')->nullable(); - $table->unsignedBigInteger('approver_id')->nullable(); - $table->enum('status', [ - 'Pending', - 'Approved', - 'Denied', - ]); - $table->timestamps(); - }); - } - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('alliance_moons'); - Schema::dropIfExists('alliance_moon_requests'); - } -} diff --git a/database/migrations/2020_05_07_033014_create_rental_moon_ledger_tables.php b/database/migrations/2020_05_07_033014_create_rental_moon_ledger_tables.php deleted file mode 100644 index fe0b6c540..000000000 --- a/database/migrations/2020_05_07_033014_create_rental_moon_ledger_tables.php +++ /dev/null @@ -1,94 +0,0 @@ -bigIncrements('id'); - $table->unsignedBigInteger('corporation_id'); - $table->string('corporation_name')->nullable(); - $table->unsignedBigInteger('observer_id'); - $table->string('observer_name')->nullable(); - $table->string('observer_type')->nullable(); - $table->dateTime('last_updated'); - $table->timestamps(); - }); - } - - if(!Schema::hasTable('alliance_rental_moon_ledgers')) { - Schema::create('alliance_rental_moon_ledgers', function(Blueprint $table) { - $table->bigIncrements('id'); - $table->unsignedBigInteger('corporation_id'); - $table->string('corporation_name')->nullable(); - $table->unsignedBigInteger('character_id'); - $table->string('character_name')->nullable(); - $table->unsignedBigInteger('observer_id'); - $table->string('observer_name')->nullable(); - $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->bigIncrements('id'); - $table->unsignedBigInteger('corporation_id'); - $table->string('corporation_name')->nullable(); - $table->unsignedBigInteger('observer_id'); - $table->string('observer_name')->nullable(); - $table->string('observer_type')->nullable(); - $table->unsignedBigInteger('observer_owner_id'); - $table->unsignedBigInteger('solar_system_id'); - $table->unsignedBigInteger('observer_type_id'); - $table->dateTime('last_updated'); - $table->timestamps(); - }); - } - - if(!Schema::hasTable('corp_moon_ledgers')) { - Schema::create('corp_moon_ledgers', function(Blueprint $table) { - $table->bigIncrements('id'); - $table->unsignedBigInteger('corporation_id'); - $table->string('corporation_name')->nullable(); - $table->unsignedBigInteger('character_id'); - $table->string('character_name')->nullable(); - $table->unsignedBigInteger('observer_id'); - $table->string('observer_name')->nullable(); - $table->unsignedBigInteger('type_id'); - $table->string('ore'); - $table->unsignedBigInteger('quantity'); - $table->unsignedBigInteger('recorded_corporation_id'); - $table->string('recorded_corporation_name')->nullable(); - $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'); - } -} diff --git a/database/migrations/2020_05_09_171338_create_alliance_moon_rental_invoices_table.php b/database/migrations/2020_05_09_171338_create_alliance_moon_rental_invoices_table.php deleted file mode 100644 index 60a5d9a99..000000000 --- a/database/migrations/2020_05_09_171338_create_alliance_moon_rental_invoices_table.php +++ /dev/null @@ -1,53 +0,0 @@ -bigIncrements('id'); - $table->string('invoice_id')->unique(); - $table->unsignedBigInteger('character_id'); - $table->string('character_name'); - $table->unsignedBigInteger('corporation_id'); - $table->string('corporation_name'); - $table->text('rental_moons')->nullalbe(); - $table->decimal('invoice_amount', 17, 2); - $table->dateTime('due_date'); - $table->enum('paid', ['Yes', 'No'])->default('No'); - $table->timestamps(); - }); - } - - if(!Schema::hasTable('alliance_moon_rental_payments')) { - Schema::create('alliance_moon_rental_payments', function (Blueprint $table) { - $table->bigIncrements('id'); - $table->string('invoice_id')->unique(); - $table->decimal('payment_amount'); - $table->timestamps(); - }); - } - - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('alliance_moon_rental_invoices'); - Schema::dropIfExists('alliance_moon_rental_payments'); - } -} diff --git a/database/migrations/2020_05_28_064641_create_alliance_moon_rentals_table.php b/database/migrations/2020_05_28_064641_create_alliance_moon_rentals_table.php deleted file mode 100644 index 36542d72b..000000000 --- a/database/migrations/2020_05_28_064641_create_alliance_moon_rentals_table.php +++ /dev/null @@ -1,77 +0,0 @@ -bigIncrements('id'); - $table->string('region'); - $table->string('system'); - $table->string('planet'); - $table->string('moon'); - $table->unsignedBigInteger('structure_id')->default(0); - $table->string('structure_name')->default('No Name'); - $table->string('first_ore')->default('None'); - $table->decimal('first_quantity')->default(0.00); - $table->string('second_ore')->default('None'); - $table->decimal('second_quantity')->default(0.00); - $table->string('third_ore')->default('None'); - $table->decimal('third_quantity')->default(0.00); - $table->string('fourth_ore')->default('None'); - $table->decimal('fourth_quantity')->default(0.00); - $table->decimal('moon_worth', 17, 2)->default(0.00); - $table->decimal('alliance_rental_price', 17,2)->default(0.00); - $table->decimal('out_of_alliance_rental_price', 17,2)->default(0.00); - $table->enum('rental_type', [ - 'Not Rented', - 'In Alliance', - 'Out of Alliance', - 'Alliance', - ])->default('Not Rented'); - $table->dateTime('rental_until')->nullable(); - $table->unsignedBigInteger('rental_contact_id')->default(0); - $table->enum('rental_contact_type', [ - 'Character', - 'Corporation', - 'Alliance', - 'Unknown', - 'Not Rented', - ])->default('Not Rented'); - $table->enum('paid' ,[ - 'Yes', - 'No', - 'Not Rented', - ])->default('Not Rented'); - $table->dateTime('paid_until')->nullable(); - $table->dateTime('alliance_use_until')->nullable(); - $table->dateTime('next_moon_pull')->nullable(); - $table->timestamps(); - }); - } - - //Drop the older tables - Schema::dropIfExists('moon_rents'); - Schema::dropIfExists('RentalMoons'); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('alliance_rental_moons'); - } -} diff --git a/database/migrations/2020_08_10_045119_create_rental_records_table.php b/database/migrations/2020_08_10_045119_create_rental_records_table.php deleted file mode 100644 index 5b4804582..000000000 --- a/database/migrations/2020_08_10_045119_create_rental_records_table.php +++ /dev/null @@ -1,41 +0,0 @@ -bigIncrements('id'); - $table->unsignedBigInteger('contact_id'); - $table->string('contact_name'); - $table->unsignedBigInteger('corporation_id'); - $table->string('corporation_name'); - $table->unsignedBigInteger('system_id'); - $table->string('system_name'); - $table->double('rental_cost', 20, 2); - $table->dateTime('paid_until'); - $table->timestamps(); - }); - } - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('alliance_rental_systems'); - } -} diff --git a/database/migrations/2021_01_10_161023_remove_contract_table.php b/database/migrations/2021_01_10_161023_remove_contract_table.php deleted file mode 100644 index 519e7f874..000000000 --- a/database/migrations/2021_01_10_161023_remove_contract_table.php +++ /dev/null @@ -1,32 +0,0 @@ -foreign('main_id') + ->references('character_id') + ->on('users') + ->cascadeOnDelete(); + }); + + Schema::table('user_roles', function(Blueprint $table) { + $table->foreign('character_id') + ->references('character_id') + ->on('users') + ->cascadeOnDelete(); + }); + + Schema::table('EsiScopes', function(Blueprint $table) { + $table->foreign('character_id') + ->references('character_id') + ->on('EsiTokens') + ->cascadeOnDelete(); + }); + + Schema::table('user_permissions', function(Blueprint $table) { + $table->foreign('character_id') + ->references('character_id') + ->on('users') + ->cascadeOnDelete(); + }); + + Schema::table('supply_chain_bids', function(Blueprint $table) { + $table->foreign('contract_id') + ->references('contract_id') + ->on('supply_chain_contracts') + ->cascadeOnDelete(); + }); + + Schema::table('alliance_mining_tax_ledgers', function(Blueprint $table) { + $table->foreign('observer_id') + ->references('observer_id') + ->on('alliance_mining_tax_observers') + ->cascadeOnDelete(); + }); + + Schema::table('alliance_mining_tax_payments', function(Blueprint $table) { + $table->foreign('invoice_id') + ->references('invoice_id') + ->on('alliance_mining_tax_invoices') + ->cascadeOnDelete(); + }); } /**