From 75f4d9a4a89b96cbe4c5e200e29bc88a54450b99 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 1 May 2022 08:18:00 +1000 Subject: [PATCH] Fixes for column type changes --- ...tom_fields_column_from_varchar_to_text.php | 221 +++++++++--------- 1 file changed, 109 insertions(+), 112 deletions(-) diff --git a/database/migrations/2022_04_26_032252_convert_custom_fields_column_from_varchar_to_text.php b/database/migrations/2022_04_26_032252_convert_custom_fields_column_from_varchar_to_text.php index 1b98756d6b..77a4f065f3 100644 --- a/database/migrations/2022_04_26_032252_convert_custom_fields_column_from_varchar_to_text.php +++ b/database/migrations/2022_04_26_032252_convert_custom_fields_column_from_varchar_to_text.php @@ -16,171 +16,168 @@ class ConvertCustomFieldsColumnFromVarcharToText extends Migration { set_time_limit(0); + Schema::table('credits', function (Blueprint $table) { - if(Ninja::isSelfHost()) - { - Schema::table('credits', function (Blueprint $table) { + $table->text('custom_value1')->change(); + $table->text('custom_value2')->change(); + $table->text('custom_value3')->change(); + $table->text('custom_value4')->change(); - $table->text('custom_value1')->change(); - $table->text('custom_value2')->change(); - $table->text('custom_value3')->change(); - $table->text('custom_value3')->change(); + }); - }); + Schema::table('client_contacts', function (Blueprint $table) { - Schema::table('client_contacts', function (Blueprint $table) { + $table->text('custom_value1')->change(); + $table->text('custom_value2')->change(); + $table->text('custom_value3')->change(); + $table->text('custom_value4')->change(); - $table->text('custom_value1')->change(); - $table->text('custom_value2')->change(); - $table->text('custom_value3')->change(); - $table->text('custom_value3')->change(); + }); - }); + Schema::table('clients', function (Blueprint $table) { - Schema::table('clients', function (Blueprint $table) { + $table->text('custom_value1')->change(); + $table->text('custom_value2')->change(); + $table->text('custom_value3')->change(); + $table->text('custom_value4')->change(); - $table->text('custom_value1')->change(); - $table->text('custom_value2')->change(); - $table->text('custom_value3')->change(); - $table->text('custom_value3')->change(); + }); - }); + Schema::table('clients', function (Blueprint $table) { - Schema::table('clients', function (Blueprint $table) { + $table->text('custom_value1')->change(); + $table->text('custom_value2')->change(); + $table->text('custom_value3')->change(); + $table->text('custom_value4')->change(); - $table->text('custom_value1')->change(); - $table->text('custom_value2')->change(); - $table->text('custom_value3')->change(); - $table->text('custom_value3')->change(); + }); - }); + Schema::table('documents', function (Blueprint $table) { - Schema::table('documents', function (Blueprint $table) { + $table->text('custom_value1')->change(); + $table->text('custom_value2')->change(); + $table->text('custom_value3')->change(); + $table->text('custom_value4')->change(); - $table->text('custom_value1')->change(); - $table->text('custom_value2')->change(); - $table->text('custom_value3')->change(); - $table->text('custom_value3')->change(); + }); - }); + Schema::table('expenses', function (Blueprint $table) { - Schema::table('expenses', function (Blueprint $table) { + $table->text('custom_value1')->change(); + $table->text('custom_value2')->change(); + $table->text('custom_value3')->change(); + $table->text('custom_value4')->change(); - $table->text('custom_value1')->change(); - $table->text('custom_value2')->change(); - $table->text('custom_value3')->change(); - $table->text('custom_value3')->change(); + }); - }); + Schema::table('invoices', function (Blueprint $table) { - Schema::table('invoices', function (Blueprint $table) { + $table->text('custom_value1')->change(); + $table->text('custom_value2')->change(); + $table->text('custom_value3')->change(); + $table->text('custom_value4')->change(); - $table->text('custom_value1')->change(); - $table->text('custom_value2')->change(); - $table->text('custom_value3')->change(); - $table->text('custom_value3')->change(); + }); - }); + Schema::table('payments', function (Blueprint $table) { - Schema::table('payments', function (Blueprint $table) { + $table->text('custom_value1')->change(); + $table->text('custom_value2')->change(); + $table->text('custom_value3')->change(); + $table->text('custom_value4')->change(); - $table->text('custom_value1')->change(); - $table->text('custom_value2')->change(); - $table->text('custom_value3')->change(); - $table->text('custom_value3')->change(); + }); - }); + Schema::table('products', function (Blueprint $table) { - Schema::table('products', function (Blueprint $table) { + $table->text('custom_value1')->change(); + $table->text('custom_value2')->change(); + $table->text('custom_value3')->change(); + $table->text('custom_value4')->change(); - $table->text('custom_value1')->change(); - $table->text('custom_value2')->change(); - $table->text('custom_value3')->change(); - $table->text('custom_value3')->change(); + }); - }); + Schema::table('projects', function (Blueprint $table) { - Schema::table('projects', function (Blueprint $table) { + $table->text('custom_value1')->change(); + $table->text('custom_value2')->change(); + $table->text('custom_value3')->change(); + $table->text('custom_value4')->change(); - $table->text('custom_value1')->change(); - $table->text('custom_value2')->change(); - $table->text('custom_value3')->change(); - $table->text('custom_value3')->change(); + }); - }); + Schema::table('quotes', function (Blueprint $table) { - Schema::table('quotes', function (Blueprint $table) { + $table->text('custom_value1')->change(); + $table->text('custom_value2')->change(); + $table->text('custom_value3')->change(); + $table->text('custom_value4')->change(); - $table->text('custom_value1')->change(); - $table->text('custom_value2')->change(); - $table->text('custom_value3')->change(); - $table->text('custom_value3')->change(); + }); - }); + Schema::table('recurring_invoices', function (Blueprint $table) { - Schema::table('recurring_invoices', function (Blueprint $table) { + $table->text('custom_value1')->change(); + $table->text('custom_value2')->change(); + $table->text('custom_value3')->change(); + $table->text('custom_value4')->change(); - $table->text('custom_value1')->change(); - $table->text('custom_value2')->change(); - $table->text('custom_value3')->change(); - $table->text('custom_value3')->change(); + }); - }); + Schema::table('recurring_quotes', function (Blueprint $table) { - Schema::table('recurring_quotes', function (Blueprint $table) { + $table->text('custom_value1')->change(); + $table->text('custom_value2')->change(); + $table->text('custom_value3')->change(); + $table->text('custom_value4')->change(); - $table->text('custom_value1')->change(); - $table->text('custom_value2')->change(); - $table->text('custom_value3')->change(); - $table->text('custom_value3')->change(); + }); - }); + Schema::table('recurring_expenses', function (Blueprint $table) { - Schema::table('recurring_expenses', function (Blueprint $table) { + $table->text('custom_value1')->change(); + $table->text('custom_value2')->change(); + $table->text('custom_value3')->change(); + $table->text('custom_value4')->change(); - $table->text('custom_value1')->change(); - $table->text('custom_value2')->change(); - $table->text('custom_value3')->change(); - $table->text('custom_value3')->change(); + }); - }); + Schema::table('tasks', function (Blueprint $table) { - Schema::table('tasks', function (Blueprint $table) { + $table->text('custom_value1')->change(); + $table->text('custom_value2')->change(); + $table->text('custom_value3')->change(); + $table->text('custom_value4')->change(); - $table->text('custom_value1')->change(); - $table->text('custom_value2')->change(); - $table->text('custom_value3')->change(); - $table->text('custom_value3')->change(); + }); - }); + Schema::table('users', function (Blueprint $table) { - Schema::table('users', function (Blueprint $table) { + $table->text('custom_value1')->change(); + $table->text('custom_value2')->change(); + $table->text('custom_value3')->change(); + $table->text('custom_value4')->change(); - $table->text('custom_value1')->change(); - $table->text('custom_value2')->change(); - $table->text('custom_value3')->change(); - $table->text('custom_value3')->change(); + }); - }); + Schema::table('vendors', function (Blueprint $table) { - Schema::table('vendors', function (Blueprint $table) { + $table->text('custom_value1')->change(); + $table->text('custom_value2')->change(); + $table->text('custom_value3')->change(); + $table->text('custom_value4')->change(); - $table->text('custom_value1')->change(); - $table->text('custom_value2')->change(); - $table->text('custom_value3')->change(); - $table->text('custom_value3')->change(); + }); - }); + Schema::table('vendor_contacts', function (Blueprint $table) { - Schema::table('vendor_contacts', function (Blueprint $table) { + $table->text('custom_value1')->change(); + $table->text('custom_value2')->change(); + $table->text('custom_value3')->change(); + $table->text('custom_value4')->change(); - $table->text('custom_value1')->change(); - $table->text('custom_value2')->change(); - $table->text('custom_value3')->change(); - $table->text('custom_value3')->change(); - - }); - } + }); + }