mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 01:17:30 -05:00 
			
		
		
		
	Don't run migration on hosted - prevent blocking db
This commit is contained in:
		
							parent
							
								
									25aadf9202
								
							
						
					
					
						commit
						81e91b2ebc
					
				@ -1,5 +1,6 @@
 | 
				
			|||||||
<?php
 | 
					<?php
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use App\Utils\Ninja;
 | 
				
			||||||
use Illuminate\Database\Migrations\Migration;
 | 
					use Illuminate\Database\Migrations\Migration;
 | 
				
			||||||
use Illuminate\Database\Schema\Blueprint;
 | 
					use Illuminate\Database\Schema\Blueprint;
 | 
				
			||||||
use Illuminate\Support\Facades\Schema;
 | 
					use Illuminate\Support\Facades\Schema;
 | 
				
			||||||
@ -15,168 +16,172 @@ class ConvertCustomFieldsColumnFromVarcharToText extends Migration
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
        set_time_limit(0);
 | 
					        set_time_limit(0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        Schema::table('credits', function (Blueprint $table) {
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $table->text('custom_value1')->change();
 | 
					        if(Ninja::isSelfHost())
 | 
				
			||||||
            $table->text('custom_value2')->change();
 | 
					        {
 | 
				
			||||||
            $table->text('custom_value3')->change();
 | 
					            Schema::table('credits', function (Blueprint $table) {
 | 
				
			||||||
            $table->text('custom_value3')->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) {
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $table->text('custom_value1')->change();
 | 
					            Schema::table('client_contacts', function (Blueprint $table) {
 | 
				
			||||||
            $table->text('custom_value2')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->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) {
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $table->text('custom_value1')->change();
 | 
					            Schema::table('clients', function (Blueprint $table) {
 | 
				
			||||||
            $table->text('custom_value2')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->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) {
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $table->text('custom_value1')->change();
 | 
					            Schema::table('clients', function (Blueprint $table) {
 | 
				
			||||||
            $table->text('custom_value2')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->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) {
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $table->text('custom_value1')->change();
 | 
					            Schema::table('documents', function (Blueprint $table) {
 | 
				
			||||||
            $table->text('custom_value2')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->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) {
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $table->text('custom_value1')->change();
 | 
					            Schema::table('expenses', function (Blueprint $table) {
 | 
				
			||||||
            $table->text('custom_value2')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->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) {
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $table->text('custom_value1')->change();
 | 
					            Schema::table('invoices', function (Blueprint $table) {
 | 
				
			||||||
            $table->text('custom_value2')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->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) {
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $table->text('custom_value1')->change();
 | 
					            Schema::table('payments', function (Blueprint $table) {
 | 
				
			||||||
            $table->text('custom_value2')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->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) {
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $table->text('custom_value1')->change();
 | 
					            Schema::table('products', function (Blueprint $table) {
 | 
				
			||||||
            $table->text('custom_value2')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->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) {
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $table->text('custom_value1')->change();
 | 
					            Schema::table('projects', function (Blueprint $table) {
 | 
				
			||||||
            $table->text('custom_value2')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->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) {
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $table->text('custom_value1')->change();
 | 
					            Schema::table('quotes', function (Blueprint $table) {
 | 
				
			||||||
            $table->text('custom_value2')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->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) {
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $table->text('custom_value1')->change();
 | 
					            Schema::table('recurring_invoices', function (Blueprint $table) {
 | 
				
			||||||
            $table->text('custom_value2')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->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) {
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $table->text('custom_value1')->change();
 | 
					            Schema::table('recurring_quotes', function (Blueprint $table) {
 | 
				
			||||||
            $table->text('custom_value2')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->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) {
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $table->text('custom_value1')->change();
 | 
					            Schema::table('recurring_expenses', function (Blueprint $table) {
 | 
				
			||||||
            $table->text('custom_value2')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->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) {
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $table->text('custom_value1')->change();
 | 
					            Schema::table('tasks', function (Blueprint $table) {
 | 
				
			||||||
            $table->text('custom_value2')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->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) {
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $table->text('custom_value1')->change();
 | 
					            Schema::table('users', function (Blueprint $table) {
 | 
				
			||||||
            $table->text('custom_value2')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->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) {
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $table->text('custom_value1')->change();
 | 
					            Schema::table('vendors', function (Blueprint $table) {
 | 
				
			||||||
            $table->text('custom_value2')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->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) {
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $table->text('custom_value1')->change();
 | 
					            Schema::table('vendor_contacts', function (Blueprint $table) {
 | 
				
			||||||
            $table->text('custom_value2')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->change();
 | 
					 | 
				
			||||||
            $table->text('custom_value3')->change();
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        });
 | 
					                $table->text('custom_value1')->change();
 | 
				
			||||||
 | 
					                $table->text('custom_value2')->change();
 | 
				
			||||||
 | 
					                $table->text('custom_value3')->change();
 | 
				
			||||||
 | 
					                $table->text('custom_value3')->change();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user