From 526a26868ac53260554e2c29392d78aa0089a07f Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 23 Jan 2023 08:15:40 +1100 Subject: [PATCH] Fixes for schema --- .../2014_10_13_000000_create_users_table.php | 24 +++++----- ...40557_add_is_public_to_documents_table.php | 8 ++-- ...31_change_custom_surcharge_column_type.php | 48 +++++++++---------- 3 files changed, 40 insertions(+), 40 deletions(-) diff --git a/database/migrations/2014_10_13_000000_create_users_table.php b/database/migrations/2014_10_13_000000_create_users_table.php index 59de4b5047b4..bf25b3891e35 100644 --- a/database/migrations/2014_10_13_000000_create_users_table.php +++ b/database/migrations/2014_10_13_000000_create_users_table.php @@ -476,10 +476,10 @@ return new class extends Migration { $t->string('custom_value4')->nullable(); $t->datetime('next_send_date')->nullable(); - $t->string('custom_surcharge1')->nullable(); - $t->string('custom_surcharge2')->nullable(); - $t->string('custom_surcharge3')->nullable(); - $t->string('custom_surcharge4')->nullable(); + $t->decimal('custom_surcharge1', 20, 6)->nullable(); + $t->decimal('custom_surcharge2', 20, 6)->nullable(); + $t->decimal('custom_surcharge3', 20, 6)->nullable(); + $t->decimal('custom_surcharge4', 20, 6)->nullable(); $t->boolean('custom_surcharge_tax1')->default(false); $t->boolean('custom_surcharge_tax2')->default(false); $t->boolean('custom_surcharge_tax3')->default(false); @@ -554,10 +554,10 @@ return new class extends Migration { $t->string('custom_value4')->nullable(); $t->datetime('next_send_date')->nullable(); - $t->string('custom_surcharge1')->nullable(); - $t->string('custom_surcharge2')->nullable(); - $t->string('custom_surcharge3')->nullable(); - $t->string('custom_surcharge4')->nullable(); + $t->decimal('custom_surcharge1', 20, 6)->nullable(); + $t->decimal('custom_surcharge2', 20, 6)->nullable(); + $t->decimal('custom_surcharge3', 20, 6)->nullable(); + $t->decimal('custom_surcharge4', 20, 6)->nullable(); $t->boolean('custom_surcharge_tax1')->default(false); $t->boolean('custom_surcharge_tax2')->default(false); $t->boolean('custom_surcharge_tax3')->default(false); @@ -791,10 +791,10 @@ return new class extends Migration { $t->string('custom_value3')->nullable(); $t->string('custom_value4')->nullable(); - $t->string('custom_surcharge1')->nullable(); - $t->string('custom_surcharge2')->nullable(); - $t->string('custom_surcharge3')->nullable(); - $t->string('custom_surcharge4')->nullable(); + $t->decimal('custom_surcharge1', 20, 6)->nullable(); + $t->decimal('custom_surcharge2', 20, 6)->nullable(); + $t->decimal('custom_surcharge3', 20, 6)->nullable(); + $t->decimal('custom_surcharge4', 20, 6)->nullable(); $t->boolean('custom_surcharge_tax1')->default(false); $t->boolean('custom_surcharge_tax2')->default(false); $t->boolean('custom_surcharge_tax3')->default(false); diff --git a/database/migrations/2020_08_18_140557_add_is_public_to_documents_table.php b/database/migrations/2020_08_18_140557_add_is_public_to_documents_table.php index 8628c31217b3..5944297e60d4 100644 --- a/database/migrations/2020_08_18_140557_add_is_public_to_documents_table.php +++ b/database/migrations/2020_08_18_140557_add_is_public_to_documents_table.php @@ -59,10 +59,10 @@ return new class extends Migration { $table->boolean('auto_bill_enabled')->default(0); $table->unsignedInteger('design_id')->nullable(); $table->boolean('uses_inclusive_taxes')->default(0); - $table->string('custom_surcharge1')->nullable(); - $table->string('custom_surcharge2')->nullable(); - $table->string('custom_surcharge3')->nullable(); - $table->string('custom_surcharge4')->nullable(); + $table->decimal('custom_surcharge1', 20, 6)->nullable(); + $table->decimal('custom_surcharge2', 20, 6)->nullable(); + $table->decimal('custom_surcharge3', 20, 6)->nullable(); + $table->decimal('custom_surcharge4', 20, 6)->nullable(); $table->boolean('custom_surcharge_tax1')->default(false); $table->boolean('custom_surcharge_tax2')->default(false); $table->boolean('custom_surcharge_tax3')->default(false); diff --git a/database/migrations/2021_01_17_040331_change_custom_surcharge_column_type.php b/database/migrations/2021_01_17_040331_change_custom_surcharge_column_type.php index cf00db8af5e3..538a3ddf9e5f 100644 --- a/database/migrations/2021_01_17_040331_change_custom_surcharge_column_type.php +++ b/database/migrations/2021_01_17_040331_change_custom_surcharge_column_type.php @@ -12,33 +12,33 @@ return new class extends Migration { */ public function up() { - Schema::table('invoices', function (Blueprint $table) { - $table->decimal('custom_surcharge1', 20, 6)->change(); - $table->decimal('custom_surcharge2', 20, 6)->change(); - $table->decimal('custom_surcharge3', 20, 6)->change(); - $table->decimal('custom_surcharge4', 20, 6)->change(); - }); + // Schema::table('invoices', function (Blueprint $table) { + // $table->decimal('custom_surcharge1', 20, 6)->change(); + // $table->decimal('custom_surcharge2', 20, 6)->change(); + // $table->decimal('custom_surcharge3', 20, 6)->change(); + // $table->decimal('custom_surcharge4', 20, 6)->change(); + // }); - Schema::table('recurring_invoices', function (Blueprint $table) { - $table->decimal('custom_surcharge1', 20, 6)->change(); - $table->decimal('custom_surcharge2', 20, 6)->change(); - $table->decimal('custom_surcharge3', 20, 6)->change(); - $table->decimal('custom_surcharge4', 20, 6)->change(); - }); + // Schema::table('recurring_invoices', function (Blueprint $table) { + // $table->decimal('custom_surcharge1', 20, 6)->change(); + // $table->decimal('custom_surcharge2', 20, 6)->change(); + // $table->decimal('custom_surcharge3', 20, 6)->change(); + // $table->decimal('custom_surcharge4', 20, 6)->change(); + // }); - Schema::table('quotes', function (Blueprint $table) { - $table->decimal('custom_surcharge1', 20, 6)->change(); - $table->decimal('custom_surcharge2', 20, 6)->change(); - $table->decimal('custom_surcharge3', 20, 6)->change(); - $table->decimal('custom_surcharge4', 20, 6)->change(); - }); + // Schema::table('quotes', function (Blueprint $table) { + // $table->decimal('custom_surcharge1', 20, 6)->change(); + // $table->decimal('custom_surcharge2', 20, 6)->change(); + // $table->decimal('custom_surcharge3', 20, 6)->change(); + // $table->decimal('custom_surcharge4', 20, 6)->change(); + // }); - Schema::table('credits', function (Blueprint $table) { - $table->decimal('custom_surcharge1', 20, 6)->change(); - $table->decimal('custom_surcharge2', 20, 6)->change(); - $table->decimal('custom_surcharge3', 20, 6)->change(); - $table->decimal('custom_surcharge4', 20, 6)->change(); - }); + // Schema::table('credits', function (Blueprint $table) { + // $table->decimal('custom_surcharge1', 20, 6)->change(); + // $table->decimal('custom_surcharge2', 20, 6)->change(); + // $table->decimal('custom_surcharge3', 20, 6)->change(); + // $table->decimal('custom_surcharge4', 20, 6)->change(); + // }); } /**