From 56762f42afa1b518e9e3e35f2d2fb194c436a69f Mon Sep 17 00:00:00 2001 From: drkthunder02 Date: Thu, 4 Jun 2020 23:35:07 -0500 Subject: [PATCH] modified migration for alliance rental moons --- ...641_create_alliance_moon_rentals_table.php | 84 ++++++++++--------- 1 file changed, 43 insertions(+), 41 deletions(-) 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 index 60aee3664..5b0b3dc08 100644 --- 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 @@ -14,47 +14,49 @@ class CreateAllianceMoonRentalsTable extends Migration public function up() { if(!Schema::hasTable('alliance_rental_moons')) { - $table->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->timestamps(); + Schema::create('alliance_rental_moons', function (Blueprint $table) { + $table->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->timestamps(); + }); } //Drop the older tables