From 20a0aecee103224f40f8aa00cc7d3a1f4e2728b3 Mon Sep 17 00:00:00 2001 From: drkthunder02 Date: Mon, 11 Jan 2021 01:07:27 +0900 Subject: [PATCH] moons update command added back in as it was accidentally deleted --- .../Commands/Moons/MoonsUpdateCommand.php | 90 +++++ .../2014_10_12_000000_create_users_table.php | 18 + .../2018_10_28_204313_create_structures.php | 23 ++ .../2018_11_17_053307_create_corp_journal.php | 78 +++++ .../2019_01_19_062656_create_clones_table.php | 45 --- ...9_07_06_070809_create_logistics_tables.php | 316 ------------------ .../2019_07_16_032310_create_alts_table.php | 43 --- ..._create_structure_market_journal_table.php | 59 ---- ...4_060812_alliance_market_journal_table.php | 47 --- ...05_050152_create_flex_structures_table.php | 49 --- ...2_233750_remove_non_utilized_db_tables.php | 37 -- ...3_081427_create_sov_bill_journal_table.php | 47 --- 12 files changed, 209 insertions(+), 643 deletions(-) create mode 100644 app/Console/Commands/Moons/MoonsUpdateCommand.php delete mode 100644 database/migrations/2019_01_19_062656_create_clones_table.php delete mode 100644 database/migrations/2019_07_06_070809_create_logistics_tables.php delete mode 100644 database/migrations/2019_07_16_032310_create_alts_table.php delete mode 100644 database/migrations/2019_07_24_025604_create_structure_market_journal_table.php delete mode 100644 database/migrations/2019_08_04_060812_alliance_market_journal_table.php delete mode 100644 database/migrations/2019_12_05_050152_create_flex_structures_table.php delete mode 100644 database/migrations/2019_12_12_233750_remove_non_utilized_db_tables.php delete mode 100644 database/migrations/2020_04_03_081427_create_sov_bill_journal_table.php diff --git a/app/Console/Commands/Moons/MoonsUpdateCommand.php b/app/Console/Commands/Moons/MoonsUpdateCommand.php new file mode 100644 index 000000000..49a6c3ca1 --- /dev/null +++ b/app/Console/Commands/Moons/MoonsUpdateCommand.php @@ -0,0 +1,90 @@ +SetStartStatus(); + + //Get all of the characters who have registered structures for moon ledgers + $miningChars = EsiScope::where([ + 'scope' => 'esi-industry.read_corporation_mining.v1', + ])->get(); + + foreach($miningChars as $mChars) { + $universe = EsiScope::where([ + 'character_id' => $mChars->character_id, + 'scope' => 'esi-universe.read_structures.v1', + ])->first(); + + if($universe != null) { + array_push($characters, $universe->character_id); + } + } + + //Cycle through each of the character Ids which have the correct scopes, + //and dispatch jobs accordingly. + foreach($characters as $charId) { + //Fetch all of the corp observers with the job dispatch + FetchMoonObserverJob::dispatch($charId); + //Fetch all of the corp ledgers with the job dispatch + FetchMoonLedgerJob::dispatch($charId); + } + + //Set task done status + $task->SetStopStatus(); + } +} diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 8dfce7875..e2d69acd0 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -33,6 +33,23 @@ class CreateUsersTable extends Migration }); } + if(!Schema::hasTable('user_alts')) { + Schema::create('user_alts', function (Blueprint $table) { + $table->increments('id'); + $table->string('name'); + $table->integer('main_id')->unsigned(); + $table->integer('character_id')->unsigned()->unique(); + $table->string('avatar'); + $table->string('access_token')->nullable(); + $table->string('refresh_token')->nullable(); + $table->integer('inserted_at')->default(0); + $table->integer('expires_in')->default(0); + $table->string('owner_hash'); + $table->rememberToken(); + $table->timestamps(); + }); + } + if(!Schema::hasTable('user_roles')) { Schema::create('user_roles', function (Blueprint $table) { $table->increments('id'); @@ -178,6 +195,7 @@ class CreateUsersTable extends Migration public function down() { Schema::dropIfExists('users'); + Schema::dropIfExists('user_alts'); Schema::dropIfExists('available_user_roles'); Schema::dropIfExists('user_roles'); Schema::dropIfExists('EsiTokens'); diff --git a/database/migrations/2018_10_28_204313_create_structures.php b/database/migrations/2018_10_28_204313_create_structures.php index 396518019..cd6f337bc 100644 --- a/database/migrations/2018_10_28_204313_create_structures.php +++ b/database/migrations/2018_10_28_204313_create_structures.php @@ -60,6 +60,28 @@ class CreateStructures extends Migration $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(); + }); + } } /** @@ -72,5 +94,6 @@ class CreateStructures extends Migration 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 index 1087753d6..fbc07245d 100644 --- a/database/migrations/2018_11_17_053307_create_corp_journal.php +++ b/database/migrations/2018_11_17_053307_create_corp_journal.php @@ -209,6 +209,80 @@ class CreateCorpJournal extends Migration $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(); + }); + } } /** @@ -228,5 +302,9 @@ class CreateCorpJournal extends Migration 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_01_19_062656_create_clones_table.php b/database/migrations/2019_01_19_062656_create_clones_table.php deleted file mode 100644 index 5524a685b..000000000 --- a/database/migrations/2019_01_19_062656_create_clones_table.php +++ /dev/null @@ -1,45 +0,0 @@ -increments('id'); - $table->string('character_id'); - $table->boolean('active'); - $table->timestamps(); - }); - } - - 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(); - }); - } - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('clones'); - Schema::dropIfExists('clones_mailing'); - } -} diff --git a/database/migrations/2019_07_06_070809_create_logistics_tables.php b/database/migrations/2019_07_06_070809_create_logistics_tables.php deleted file mode 100644 index 21f267ce2..000000000 --- a/database/migrations/2019_07_06_070809_create_logistics_tables.php +++ /dev/null @@ -1,316 +0,0 @@ -string('contract_id')->unique(); - $table->string('acceptor_id'); - $table->string('assignee_id'); - $table->enum('availability', [ - 'public', - 'personel', - 'corporation', - 'alliance', - ]); - $table->string('buyout')->nullable(); - $table->string('collateral')->nullable(); - $table->dateTime('date_accepted')->nullable(); - $table->dateTime('date_completed')->nullable(); - $table->dateTime('date_expired'); - $table->dateTime('date_issued'); - $table->integer('days_to_complete')->nullable(); - $table->string('end_location_id')->nullable(); - $table->boolean('for_corporation'); - $table->string('issuer_corporation_id'); - $table->string('issuer_id'); - $table->decimal('price', 20, 2)->default(0.00); - $table->decimal('reward', 20, 2)->default(0.00); - $table->string('start_location_id')->nullable(); - $table->enum('status',[ - 'outstanding', - 'in_progress', - 'finished_issuer', - 'finished_contractor', - 'finished', - 'cancelled', - 'rejected', - 'failed', - 'deleted', - 'reversed', - ]); - $table->string('title')->nullalbe(); - $table->enum('type', [ - 'unknown', - 'item_exchange', - 'auction', - 'courier', - 'loan', - ]); - $table->decimal('volume', 20, 2)->default(0.00); - $table->timestamps(); - }); - } - - if(!Schema::hasTable('logistics_contracts')) { - Schema::create('logistics_contracts', function (Blueprint $table) { - $table->increments('id'); - $table->string('contract_id'); - $table->string('status')->default('N/A'); - $table->enum('rush', [ - 'No', - 'Yes', - ])->default('No'); - $table->timestamps(); - }); - } - - if(!Schema::hasTable('solar_systems')) { - Schema::create('solar_systems', function (Blueprint $table) { - $table->increments('id'); - $table->string('name'); - $table->string('solar_system_id')->unique(); - }); - } - - if(!Schema::hasTable('solar_system_distances')) { - Schema::create('solar_system_distances', function (Blueprint $table) { - $table->increments('id'); - $table->string('start_id'); - $table->string('start_name'); - $table->string('end_id'); - $table->string('end_name'); - $table->decimal('distance', 20, 6); - $table->integer('isotopes'); - }); - } - - DB::table('solar_system_distances')->insert([ - 'start_id' => '30001195', - 'start_name' => 'J-ODE7', - 'end_id' => '30002269', - 'end_name' => 'Ebo', - 'distance' => 16.953, - 'isotopes' => 53706, - ]); - - DB::table('solar_system_distances')->insert([ - 'start_id' => '30002269', - 'start_name' => 'Ebo', - 'end_id' => '30001195', - 'end_name' => 'J-ODE7', - 'distance' => 16.953, - 'isotopes' => 53706, - ]); - - DB::table('solar_system_distances')->insert([ - 'start_id' => '30001195', - 'start_name' => 'J-ODE7', - 'end_id' => '30002110', - 'end_name' => 'B9E-H6', - 'distance' => 5.587, - 'isotopes' => 17699, - ]); - - DB::table('solar_system_distances')->insert([ - 'start_id' => '30002110', - 'start_name' => 'B9E-H6', - 'end_id' => '30001195', - 'end_name' => 'J-ODE7', - 'distance' => 5.587, - 'isotopes' => 17699, - ]); - - DB::table('solar_system_distances')->insert([ - 'start_id' => 30002269, - 'start_name' => 'Ebo', - 'end_id' => 30002142, - 'end_name' => 'L-5JCJ', - 'distance' => 26.009, - 'isotopes' => 82393, - ]); - - DB::table('solar_system_distances')->insert([ - 'start_id' => 30002142, - 'start_name' => 'L-5JCJ', - 'end_id' => 30002269, - 'end_name' => 'Ebo', - 'distance' => 26.009, - 'isotopes' => 82393, - ]); - - DB::table('solar_system_distances')->insert([ - 'start_id' => 30001195, - 'start_name' => 'J-ODE7', - 'end_id' => 30002142, - 'end_name' => 'L-5JCJ', - 'distance'=> 8.779, - 'isotopes' => 27811, - ]); - - DB::table('solar_system_distances')->insert([ - 'start_id' => 30002142, - 'start_name' => 'L-5JCJ', - 'end_id' => 30001195, - 'end_name' => 'J-ODE7', - 'distance' => 8.779, - 'isotopes' => 278111, - ]); - - if(!Schema::hasTable('logistics_routes')) { - Schema::create('logistics_routes', function (Blueprint $table) { - $table->increments('id'); - $table->string('name'); - $table->decimal('price_per_m3', 20, 2); - $table->decimal('max_size', 20, 2); - }); - } - - DB::table('logistics_routes')->insert([ - 'name' => 'J-ODE7 -> Ebo', - 'price_per_m3' => 300.00, - 'max_size' => 300000.00, - ]); - - DB::table('logistics_routes')->insert([ - 'name' => 'Ebo -> J-ODE7', - 'price_per_m3' => 300.00, - 'max_size' => 300000.00, - ]); - - DB::table('logistics_routes')->insert([ - 'name' => 'J-ODE7 -> B9E-H6', - 'price_per_m3' => 150.00, - 'max_size' => 300000.00, - ]); - - DB::table('logistics_routes')->insert([ - 'name' => 'B9E-H6 -> J-ODE7', - 'price_per_m3' => 150.00, - 'max_size' => 300000.00, - ]); - - DB::table('logistics_routes')->insert([ - 'name' => 'Ebo -> L-5JCJ', - 'price_per_m3' => 600.00, - 'max_size' => 300000.00, - ]); - - DB::table('logistics_routes')->insert([ - 'name' => 'L-5JCJ -> Ebo', - 'price_per_m3' => 600.00, - 'max_size' => 300000.00, - ]); - - DB::table('logistics_routes')->insert([ - 'name' => 'J-ODE7 -> L-5JCJ', - 'price_per_m3' => 300.00, - 'max_size' => 300000.00, - ]); - - DB::table('logistics_routes')->insert([ - 'name' => 'L-5JCJ -> J-ODE7', - 'price_per_m3' => 300.00, - 'max_size' => 300000.00, - ]); - - DB::table('logistics_routes')->insert([ - 'name' => 'Jita -> U-QVWD', - 'price_per_m3'=> 950.00, - 'max_size' => 330000.00, - ]); - - DB::table('logistics_routes')->insert([ - 'name' => 'U-QVWD -> Jita', - 'price_per_m3' => 950.00, - 'max_size' => 330000.00, - ]); - - DB::table('logistics_routes')->insert([ - 'name' => 'Jita -> J-ODE7', - 'price_per_m3' => 1000.00, - 'max_size' => 330000.00, - ]); - - DB::table('logistics_routes')->insert([ - 'name' => 'J-ODE7-> Jita', - 'price_per_m3' => 1000.00, - 'max_size' => 330000.00, - ]); - - DB::table('logistics_routes')->insert([ - 'name' => 'Jita -> B9E-H6', - 'price_per_m3' => 1000.00, - 'max_size'=> 330000.00, - ]); - - DB::table('logistics_routes')->insert([ - 'name' => 'B9E-H6 -> Jita', - 'price_per_m3' => 1000.00, - 'max_size' => 330000.00, - ]); - - DB::table('logistics_routes')->insert([ - 'name' => 'Jita -> UALX-3', - 'price_per_m3' => 1000.00, - 'max_size' => 330000.00, - ]); - - DB::table('logistics_routes')->insert([ - 'name' => 'UALX-3 -> Jita', - 'price_per_m3' => 1000.00, - 'max_size' => 330000.00, - ]); - - if(!Schema::hasTable('logistics_insurance_deposits')) { - Schema::create('logistics_insurance_deposits', function(Blueprint $table) { - $table->increments('id'); - $table->string('character_id'); - $table->string('character_name'); - $table->string('corporation_id'); - $table->string('corporation_name'); - $table->decimal('amount', 20, 2); - }); - } - - if(!Schema::hasTable('logistics_insurance_payouts')) { - Schema::create('logistics_insurance_payouts', function(Blueprint $table) { - $table->increments('id'); - $table->string('character_id'); - $table->string('character_name')->nullalbe(); - $table->string('corporation_id'); - $table->string('corporation_name')->nullable(); - $table->string('authorized_by_id'); - $table->string('authorized_by_name')->nullalbe(); - $table->decimal('amount', 20, 2)->nullalbe(); - }); - } - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('eve_contracts'); - Schema::dropIfExists('logistics_contracts'); - Schema::dropIfExists('solar_systems'); - Schema::dropIfExists('solar_system_distances'); - Schema::dropIfExists('logistics_routes'); - Schema::dropIfExists('logistics_insurance_deposits'); - Schema::dropIfExists('logistics_insurance_payouts'); - } -} diff --git a/database/migrations/2019_07_16_032310_create_alts_table.php b/database/migrations/2019_07_16_032310_create_alts_table.php deleted file mode 100644 index f1fa65788..000000000 --- a/database/migrations/2019_07_16_032310_create_alts_table.php +++ /dev/null @@ -1,43 +0,0 @@ -increments('id'); - $table->string('name'); - $table->integer('main_id')->unsigned(); - $table->integer('character_id')->unsigned()->unique(); - $table->string('avatar'); - $table->string('access_token')->nullable(); - $table->string('refresh_token')->nullable(); - $table->integer('inserted_at')->default(0); - $table->integer('expires_in')->default(0); - $table->string('owner_hash'); - $table->rememberToken(); - $table->timestamps(); - }); - } - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('user_alts'); - } -} diff --git a/database/migrations/2019_07_24_025604_create_structure_market_journal_table.php b/database/migrations/2019_07_24_025604_create_structure_market_journal_table.php deleted file mode 100644 index b86f885d2..000000000 --- a/database/migrations/2019_07_24_025604_create_structure_market_journal_table.php +++ /dev/null @@ -1,59 +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->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(); - }); - } - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('corp_market_journal'); - Schema::dropIfExists('corp_market_structures'); - } -} diff --git a/database/migrations/2019_08_04_060812_alliance_market_journal_table.php b/database/migrations/2019_08_04_060812_alliance_market_journal_table.php deleted file mode 100644 index 3c480640b..000000000 --- a/database/migrations/2019_08_04_060812_alliance_market_journal_table.php +++ /dev/null @@ -1,47 +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->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('alliance_market_journal'); - } -} diff --git a/database/migrations/2019_12_05_050152_create_flex_structures_table.php b/database/migrations/2019_12_05_050152_create_flex_structures_table.php deleted file mode 100644 index a462265ac..000000000 --- a/database/migrations/2019_12_05_050152_create_flex_structures_table.php +++ /dev/null @@ -1,49 +0,0 @@ -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('flex_structures'); - } -} diff --git a/database/migrations/2019_12_12_233750_remove_non_utilized_db_tables.php b/database/migrations/2019_12_12_233750_remove_non_utilized_db_tables.php deleted file mode 100644 index b61fdeff2..000000000 --- a/database/migrations/2019_12_12_233750_remove_non_utilized_db_tables.php +++ /dev/null @@ -1,37 +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->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('sov_bill_journal'); - } -}