Files
alliance-services/database/migrations/2026_03_10_013849_create_eve_tables.php
2026-03-10 02:10:28 -05:00

1369 lines
48 KiB
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
if (!Schema::hasTable('eve_mails')) {
Schema::create('eve_mails', function (Blueprint $table){
$table->increments('id');
$table->string('sender');
$table->string('recipient');
$table->string('recipient_type');
$table->text('subject');
$table->text('body');
$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');
});
}
if(!Schema::hasTable('citadels')) {
Schema::create('citadels', function(Blueprint $table) {
$table->string('structure_id')->unique();
$table->string('structure_name');
$table->string('solar_system_id');
$table->string('solar_system_name')->nullable();
$table->string('type_id');
$table->string('corporation_id');
$table->boolean('services');
$table->enum('state', [
'anchor_vulnerable',
'anchoring',
'armor_reinforce',
'armor_vulnerable',
'deploy_vulnerable',
'fitting_invulnerable',
'hull_reinforce',
'hull_vulnerable',
'online_deprecated',
'onlining_vulnerable',
'shield_vulnerable',
'unanchored',
'unknown',
]);
$table->dateTime('state_timer_start')->nullable();
$table->dateTime('state_timer_end')->nullable();
$table->dateTime('fuel_expires')->nullable();
$table->string('profile_id');
$table->string('position_x');
$table->string('position_y');
$table->string('position_z');
$table->dateTime('next_reinforce_apply')->nullable();
$table->integer('next_reinforce_hour')->nullable();
$table->integer('next_reinforce_weekday')->nullable();
$table->integer('reinforce_hour');
$table->integer('reinforce_weekday')->nullable();
$table->dateTime('unanchors_at')->nullable();
$table->timestamps();
});
}
if(!Schema::hasTable('citadel_services')) {
Schema::create('citadel_services', function(Blueprint $table) {
$table->increments('id');
$table->string('structure_id');
$table->string('name');
$table->enum('state', [
'online',
'offline',
'cleanup',
]);
$table->timestamps();
});
}
if(!Schema::hasTable('assets')) {
Schema::create('assets', function(Blueprint $table) {
$table->increments('id');
$table->boolean('is_blueprint_copy')->nullable();
$table->boolean('is_singleton');
$table->string('item_id');
$table->enum('location_flag', [
'AssetSafety',
'AutoFit',
'Bonus',
'Booster',
'BoosterBay',
'Capsule',
'Cargo',
'CorpDeliveries',
'CorpSAG1',
'CorpSAG2',
'CorpSAG3',
'CorpSAG4',
'CorpSAG5',
'CorpSAG6',
'CorpSAG7',
'CrateLoot',
'Deliveries',
'DroneBay',
'DustBattle',
'DustDatabank',
'FighterBay',
'FighterTube0',
'FighterTube1',
'FighterTube2',
'FighterTube3',
'FighterTube4',
'FleetHangar',
'FrigateEscapeBay',
'Hangar',
'HangarAll',
'HiSlot0',
'HiSlot1',
'HiSlot2',
'HiSlot3',
'HiSlot4',
'HiSlot5',
'HiSlot6',
'HiSlot7',
'HiddenModifiers',
'Implant',
'Impounded',
'JunkyardReprocessed',
'JunkyardTrashed',
'LoSlot0',
'LoSlot1',
'LoSlot2',
'LoSlot3',
'LoSlot4',
'LoSlot5',
'LoSlot6',
'LoSlot7',
'Locked',
'MedSlot0',
'MedSlot1',
'MedSlot2',
'MedSlot3',
'MedSlot4',
'MedSlot5',
'MedSlot6',
'MedSlot7',
'OfficeFolder',
'Pilot',
'PlanetSurface',
'QuafeBay',
'QuantumCoreRoom',
'Reward',
'RigSlot0',
'RigSlot1',
'RigSlot2',
'RigSlot3',
'RigSlot4',
'RigSlot5',
'RigSlot6',
'RigSlot7',
'SecondaryStorage',
'ServiceSlot0',
'ServiceSlot1',
'ServiceSlot2',
'ServiceSlot3',
'ServiceSlot4',
'ServiceSlot5',
'ServiceSlot6',
'ServiceSlot7',
'ShipHangar',
'ShipOffline',
'Skill',
'SkillInTraining',
'SpecializedAmmoHold',
'SpecializedCommandCenterHold',
'SpecializedFuelBay',
'SpecializedGasHold',
'SpecializedIndustrialShipHold',
'SpecializedLargeShipHold',
'SpecializedMaterialBay',
'SpecializedMediumShipHold',
'SpecializedMineralHold',
'SpecializedOreHold',
'SpecializedPlanetaryCommoditiesHold',
'SpecializedSalvageHold',
'SpecializedShipHold',
'SpecializedSmallShipHold',
'StructureActive',
'StructureFuel',
'StructureInactive',
'StructureOffline',
'SubSystemBay',
'SubSystemSlot0',
'SubSystemSlot1',
'SubSystemSlot2',
'SubSystemSlot3',
'SubSystemSlot4',
'SubSystemSlot5',
'SubSystemSlot6',
'SubSystemSlot7',
'Unlocked',
'Wallet',
'Wardrobe',
]);
$table->string('location_id');
$table->string('location_type');
$table->integer('quantity');
$table->string('type_id');
$table->timestamps();
});
}
if(!Schema::hasTable('wormholes')) {
Schema::create('wormholes', function (Blueprint $table) {
$table->increments('id');
$table->string('system');
$table->string('sig_id');
$table->string('duration_left');
$table->dateTime('dateTime');
$table->enum('class', [
'C1',
'C2',
'C3',
'C4',
'C5',
'C6',
'C7',
'C8',
'C9',
'C13',
'Drifter',
'Thera',
'Exit WH',
]);
$table->string('type');
$table->enum('hole_size', [
'XS',
'S',
'M',
'L',
'XL',
]);
$table->enum('stability', [
'Stable',
'Non-Critical',
'Critical',
]);
$table->text('details')->nullable();
$table->string('link')->nullable();
$table->unsignedBigInteger('mass_allowed');
$table->unsignedBigInteger('individual_mass');
$table->unsignedBigInteger('regeneration');
$table->enum('stable_time', [
'>24 hours',
'>4 hours <24 hours',
'<4 hours',
]);
$table->timestamps();
});
if(!Schema::hasTable('wormhole_types')) {
Schema::create('wormhole_types', function (Blueprint $table) {
$table->increments('id');
$table->string('type');
$table->string('leads_to');
$table->unsignedBigInteger('mass_allowed');
$table->unsignedBigInteger('individual_mass');
$table->unsignedBigInteger('regeneration');
$table->unsignedBigInteger('max_stable_time');
});
}
DB::table('wormhole_types')->insert([
'type' => 'A009',
'type' => 'C13',
'leads_to' => 'W-Space',
'mass_allowed' => 500000000,
'individual_mass' => 20000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'A239',
'type' => 'C8',
'leads_to' => 'Lowsec',
'mass_allowed' => 2000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'A641',
'type' => 'C7',
'leads_to' => 'Highsec',
'mass_allowed' => 2000000000,
'individual_mass' => 1000000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'A982',
'type' => 'C6',
'leads_to' => 'W-Space',
'mass_allowed' => 3000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'B041',
'type' => 'C6',
'leads_to' => 'W-Space',
'mass_allowed' => 5000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 48,
]);
DB::table('wormhole_types')->insert([
'type' => 'B274',
'type' => 'C7',
'leads_to' => 'Highsec',
'mass_allowed' => 2000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'B449',
'type' => 'C7',
'leads_to' => 'Highsec',
'mass_allowed' => 2000000000,
'individual_mass' => 1000000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'B520',
'type' => 'C7',
'leads_to' => 'Highsec',
'mass_allowed' => 5000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'B735',
'type' => 'Drifter',
'leads_to' => 'Barbican',
'mass_allowed' => 750000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'C008',
'type' => 'C5',
'leads_to' => 'W-Space',
'mass_allowed' => 1000000000,
'individual_mass' => 5000000,
'regeneration' => 500000000,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'C125',
'type' => 'C2',
'leads_to' => 'W-Space',
'mass_allowed' => 1000000000,
'individual_mass' => 20000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'C140',
'type' => 'C8',
'leads_to' => 'Lowsec',
'mass_allowed' => 3000000000,
'individual_mass' => 1350000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'C247',
'type' => 'C3',
'leads_to' => 'W-Space',
'mass_allowed' => 2000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'C248',
'type' => 'C9',
'leads_to' => 'Nullsec',
'mass_allowed' => 5000000000,
'individual_mass' => 1800000000,
'regeneration' => 500000000,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'C391',
'type' => 'C8',
'leads_to' => 'Lowsec',
'mass_allowed' => 5000000000,
'individual_mass' => 1800000000,
'regeneration' => 500000000,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'C414',
'type' => 'Drifter',
'leads_to' => 'Conflux',
'mass_allowed' => 750000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'D364',
'type' => 'C2',
'leads_to' => 'W-Space',
'mass_allowed' => 1000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'D382',
'type' => 'C2',
'leads_to' => 'W-Space',
'mass_allowed' => 1000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'D792',
'type' => 'C7',
'leads_to' => 'Highsec',
'mass_allowed' => 3000000000,
'individual_mass' => 1000000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'D845',
'type' => 'C7',
'leads_to' => 'Highsec',
'mass_allowed' => 3000000000,
'individual_mass' => 1000000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'E004',
'type' => 'C1',
'leads_to' => 'W-Space',
'mass_allowed' => 1000000000,
'individual_mass' => 5000000,
'regeneration' => 500000000,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'E175',
'type' => 'C1',
'leads_to' => 'W-Space',
'mass_allowed' => 1000000000,
'individual_mass' => 5000000,
'regeneration' => 500000000,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'E545',
'type' => 'C9',
'leads_to' => 'Nullsec',
'mass_allowed' => 2000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'E587',
'type' => 'C9',
'leads_to' => 'Nullsec',
'mass_allowed' => 3000000000,
'individual_mass' => 1000000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'F135',
'type' => 'Thera',
'leads_to' => 'Thera',
'mass_allowed' => 750000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'F353',
'type' => 'Thera',
'leads_to' => 'Thera',
'mass_allowed' => 100000000,
'individual_mass' => 20000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'F355',
'type' => 'Thera',
'leads_to' => 'Thera',
'mass_allowed' => 100000000,
'individual_mass' => 20000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'G008',
'type' => 'C6',
'leads_to' => 'W-Space',
'mass_allowed' => 1000000000,
'individual_mass' => 5000000,
'regeneration' => 500000000,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'G024',
'type' => 'C2',
'leads_to' => 'W-Space',
'mass_allowed' => 2000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'H121',
'type' => 'C1',
'leads_to' => 'W-Space',
'mass_allowed' => 500000000,
'individual_mass' => 20000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'H296',
'type' => 'C5',
'leads_to' => 'W-Space',
'mass_allowed' => 3000000000,
'individual_mass' => 1350000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'H900',
'type' => 'C5',
'leads_to' => 'W-Space',
'mass_allowed' => 3000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'I182',
'type' => 'C2',
'leads_to' => 'W-Space',
'mass_allowed' => 2000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'J244',
'type' => 'C8',
'leads_to' => 'Lowsec',
'mass_allowed' => 1000000000,
'individual_mass' => 20000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'K162',
'type' => 'Exit WH',
'leads_to' => 'Exit',
'mass_allowed' => 0,
'individual_mass' => 0,
'regeneration' => 0,
'max_stable_time' => 0,
]);
DB::table('wormhole_types')->insert([
'type' => 'K329',
'type' => 'C9',
'leads_to' => 'Nullsec',
'mass_allowed' => 5000000000,
'individual_mass' => 1800000000,
'regeneration' => 500000000,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'K346',
'type' => 'C9',
'leads_to' => 'Nullsec',
'mass_allowed' => 3000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'L005',
'type' => 'C2',
'leads_to' => 'W-Space',
'mass_allowed' => 1000000000,
'individual_mass' => 5000000,
'regeneration' => 500000000,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'L031',
'type' => 'Thera',
'leads_to' => 'Thera',
'mass_allowed' => 3000000000,
'individual_mass' => 1000000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'L477',
'type' => 'C3',
'leads_to' => 'W-Space',
'mass_allowed' => 2000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'L614',
'type' => 'C5',
'leads_to' => 'W-Space',
'mass_allowed' => 1000000000,
'individual_mass' => 20000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'M001',
'type' => 'C4',
'leads_to' => 'W-Space',
'mass_allowed' => 1000000000,
'individual_mass' => 5000000,
'regeneration' => 500000000,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'M164',
'type' => 'Thera',
'leads_to' => 'Thera',
'mass_allowed' => 2000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'M267',
'type' => 'C3',
'leads_to' => 'W-Space',
'mass_allowed' => 1000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'M555',
'type' => 'C5',
'leads_to' => 'W-Space',
'mass_allowed' => 3000000000,
'individual_mass' => 1000000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'M609',
'type' => 'C4',
'leads_to' => 'W-Space',
'mass_allowed' => 1000000000,
'individual_mass' => 20000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'N062',
'type' => 'C5',
'leads_to' => 'W-Space',
'mass_allowed' => 3000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'N110',
'type' => 'C7',
'leads_to' => 'Highsec',
'mass_allowed' => 1000000000,
'individual_mass' => 20000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'N290',
'type' => 'C8',
'leads_to' => 'Lowsec',
'mass_allowed' => 5000000000,
'individual_mass' => 1800000000,
'regeneration' => 500000000,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'N432',
'type' => 'C5',
'leads_to' => 'W-Space',
'mass_allowed' => 3000000000,
'individual_mass' => 1350000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'N766',
'type' => 'C2',
'leads_to' => 'W-Space',
'mass_allowed' => 2000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'N770',
'type' => 'C5',
'leads_to' => 'W-Space',
'mass_allowed' => 3000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'N944',
'type' => 'C8',
'leads_to' => 'Lowsec',
'mass_allowed' => 3000000000,
'individual_mass' => 1350000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'N968',
'type' => 'C3',
'leads_to' => 'W-Space',
'mass_allowed' => 2000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'O128',
'type' => 'C4',
'leads_to' => 'W-Space',
'mass_allowed' => 1000000000,
'individual_mass' => 300000000,
'regeneration' => 100000000,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'O477',
'type' => 'C3',
'leads_to' => 'W-Space',
'mass_allowed' => 2000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'O883',
'type' => 'C3',
'leads_to' => 'W-Space',
'mass_allowed' => 1000000000,
'individual_mass' => 20000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'P060',
'type' => 'C1',
'leads_to' => 'W-Space',
'mass_allowed' => 500000000,
'individual_mass' => 20000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'Q003',
'type' => 'C9',
'leads_to' => 'Nullsec',
'mass_allowed' => 1000000000,
'individual_mass' => 5000000,
'regeneration' => 500000000,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'Q063',
'type' => 'C7',
'leads_to' => 'Highsec',
'mass_allowed' => 500000000,
'individual_mass' => 20000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'Q317',
'type' => 'C1',
'leads_to' => 'W-Space',
'mass_allowed' => 500000000,
'individual_mass' => 20000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'R051',
'type' => 'C8',
'leads_to' => 'Lowsec',
'mass_allowed' => 3000000000,
'individual_mass' => 1000000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'R259',
'type' => 'Drifter',
'leads_to' => 'Redoubt',
'mass_allowed' => 750000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'R474',
'type' => 'C6',
'leads_to' => 'W-Space',
'mass_allowed' => 3000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'R943',
'type' => 'C2',
'leads_to' => 'W-Space',
'mass_allowed' => 750000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'S047',
'type' => 'C7',
'leads_to' => 'Highsec',
'mass_allowed' => 3000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'S199',
'type' => 'C9',
'leads_to' => 'Nullsec',
'mass_allowed' => 3000000000,
'individual_mass' => 1350000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'S804',
'type' => 'C6',
'leads_to' => 'W-Space',
'mass_allowed' => 1000000000,
'individual_mass' => 20000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'S877',
'type' => 'Drifter',
'leads_to' => 'Sentinel',
'mass_allowed' => 750000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'T405',
'type' => 'C4',
'leads_to' => 'W-Space',
'mass_allowed' => 2000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'T458',
'type' => 'Thera',
'leads_to' => 'Thera',
'mass_allowed' => 500000000,
'individual_mass' => 20000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'U210',
'type' => 'C8',
'leads_to' => 'Lowsec',
'mass_allowed' => 3000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'U319',
'type' => 'C6',
'leads_to' => 'W-Space',
'mass_allowed' => 3000000000,
'individual_mass' => 1800000000,
'regeneration' => 500000000,
'max_stable_time' => 48,
]);
DB::table('wormhole_types')->insert([
'type' => 'U574',
'type' => 'C6',
'leads_to' => 'W-Space',
'mass_allowed' => 3000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'V283',
'type' => 'C9',
'leads_to' => 'Nullsec',
'mass_allowed' => 3000000000,
'individual_mass' => 1000000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'V301',
'type' => 'C1',
'leads_to' => 'W-Space',
'mass_allowed' => 500000000,
'individual_mass' => 20000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'V753',
'type' => 'C6',
'leads_to' => 'W-Space',
'mass_allowed' => 3000000000,
'individual_mass' => 1350000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'V898',
'type' => 'C8',
'leads_to' => 'Lowsec',
'mass_allowed' => 2000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'V911',
'type' => 'C5',
'leads_to' => 'W-Space',
'mass_allowed' => 3000000000,
'individual_mass' => 1350000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'V928',
'type' => 'Drifter',
'leads_to' => 'Vidette',
'mass_allowed' => 750000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'W237',
'type' => 'C6',
'leads_to' => 'W-Space',
'mass_allowed' => 3000000000,
'individual_mass' => 1350000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'X702',
'type' => 'C3',
'leads_to' => 'W-Space',
'mass_allowed' => 1000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'X877',
'type' => 'C4',
'leads_to' => 'W-Space',
'mass_allowed' => 2000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'Y683',
'type' => 'C4',
'leads_to' => 'W-Space',
'mass_allowed' => 2000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'Y790',
'type' => 'C1',
'leads_to' => 'W-Space',
'mass_allowed' => 500000000,
'individual_mass' => 20000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'Z006',
'type' => 'C3',
'leads_to' => 'W-Space',
'mass_allowed' => 1000000000,
'individual_mass' => 5000000,
'regeneration' => 5000000,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'Z060',
'type' => 'C9',
'leads_to' => 'Nullsec',
'mass_allowed' => 1000000000,
'individual_mass' => 20000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'Z142',
'type' => 'C9',
'leads_to' => 'Nullsec',
'mass_allowed' => 3000000000,
'individual_mass' => 1350000000,
'regeneration' => 0,
'max_stable_time' => 24,
]);
DB::table('wormhole_types')->insert([
'type' => 'Z457',
'type' => 'C4',
'leads_to' => 'W-Space',
'mass_allowed' => 2000000000,
'individual_mass' => 300000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'Z647',
'type' => 'C1',
'leads_to' => 'W-Space',
'mass_allowed' => 500000000,
'individual_mass' => 20000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
DB::table('wormhole_types')->insert([
'type' => 'Z971',
'type' => 'C1',
'leads_to' => 'W-Space',
'mass_allowed' => 100000000,
'individual_mass' => 20000000,
'regeneration' => 0,
'max_stable_time' => 16,
]);
}
if(!Schema::hasTable('corporation_wallet_journal')) {
Schema::create('corporation_wallet_journal', function (Blueprint $table) {
$table->unsignedBigInteger('id')->unique();
$table->unsignedBigInteger('corporation_id');
$table->unsignedInteger('division');
$table->decimal('amount', 20, 2)->nullable();
$table->decimal('balance', 20, 2)->nullable();
$table->unsignedBigInteger('context_id')->nullable();
$table->enum('context_id_type', [
'structure_id',
'station_id',
'market_transaction_id',
'character_id',
'corporation_id',
'alliance_id',
'eve_system',
'industry_job_id',
'contract_id',
'planet_id',
'system_id',
'type_id',
])->nullable();
$table->dateTime('date')->nullable();
$table->string('description')->nullable();
$table->unsignedBigInteger('first_party_id')->nulalble();
$table->string('reason')->nullable();
$table->enum('ref_type', [
'acceleration_gate_fee',
'advertisement_listing_fee',
'agent_donation',
'agent_location_services',
'agent_miscellaneous',
'agent_mission_collateral_paid',
'agent_mission_collateral_refunded',
'agent_mission_reward',
'agent_mission_reward_corporation_tax',
'agent_mission_time_bonus_reward',
'agent_mission_time_bonus_reward_corporation_tax',
'agent_security_services',
'agent_services_rendered',
'agents_preward',
'alliance_maintainance_fee',
'alliance_registration_fee',
'asset_safety_recovery_tax',
'bounty',
'bounty_prize',
'bounty_prize_corporation_tax',
'bounty_prizes',
'bounty_reimbursement',
'bounty_surcharge',
'brokers_fee',
'clone_activation',
'clone_transfer',
'contraband_fine',
'contract_auction_bid',
'contract_auction_bid_corp',
'contract_auction_bid_refund',
'contract_auction_sold',
'contract_brokers_fee',
'contract_brokers_fee_corp',
'contract_collateral',
'contract_collateral_deposited_corp',
'contract_collateral_payout',
'contract_collateral_refund',
'contract_deposit',
'contract_deposit_corp',
'contract_deposit_refund',
'contract_deposit_sales_tax',
'contract_price',
'contract_price_payment_corp',
'contract_reversal',
'contract_reward',
'contract_reward_deposited',
'contract_reward_deposited_corp',
'contract_reward_refund',
'contract_sales_tax',
'copying',
'corporate_reward_payout',
'corporate_reward_tax',
'corporation_account_withdrawal',
'corporation_bulk_payment',
'corporation_dividend_payment',
'corporation_liquidation',
'corporation_logo_change_cost',
'corporation_payment',
'corporation_registration_fee',
'courier_mission_escrow',
'cspa',
'cspaofflinerefund',
'datacore_fee',
'dna_modification_fee',
'docking_fee',
'duel_wager_escrow',
'duel_wager_payment',
'duel_wager_refund',
'ess_escrow_transfer',
'factory_slot_rental_fee',
'gm_cash_transfer',
'industry_job_tax',
'infrastructure_hub_maintenance',
'inheritance',
'insurance',
'item_trader_payment',
'jump_clone_activation_fee',
'jump_clone_installation_fee',
'kill_right_fee',
'lp_store',
'manufacturing',
'market_escrow',
'market_fine_paid',
'market_transaction',
'medal_creation',
'medal_issued',
'mission_completion',
'mission_cost',
'mission_expiration',
'mission_reward',
'office_rental_fee',
'operation_bonus',
'opportunity_reward',
'planetary_construction',
'planetary_export_tax',
'planetary_import_tax',
'player_donation',
'player_trading',
'project_discovery_reward',
'project_discovery_tax',
'reaction',
'release_of_impounded_property',
'repair_bill',
'reprocessing_tax',
'researching_material_productivity',
'researching_technology',
'researching_time_productivity',
'resource_wars_reward',
'reverse_engineering',
'security_processing_fee',
'shares',
'skill_purchase',
'sovereignity_bill',
'store_purchase',
'store_purchase_refund',
'structure_gate_jump',
'transaction_tax',
'upkeep_adjustment_fee',
'war_ally_contract',
'war_fee',
'war_fee_surrender',
]);
$table->unsignedBigInteger('second_party_id')->nullable();
$table->decimal('tax', 20, 2)->default(0.00);
$table->unsignedBigInteger('tax_receiver_id')->nullable();
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('eve_mails');
Schema::dropIfExists('sent_mail');
Schema::dropIfExists('citadels');
Schema::dropIfExists('citadel_services');
Schema::dropIfExists('assets');
Schema::dropIfExists('wormholes');
Schema::dropIfExists('wormhole_types');
Schema::dropIfExists('corporation_wallet_journal');
Schema::dropIfExists('character_wallet_journal');
}
};