|
| 1 | +<?php |
| 2 | + |
| 3 | +use Illuminate\Database\Migrations\Migration; |
| 4 | +use Illuminate\Database\Schema\Blueprint; |
| 5 | +use Illuminate\Support\Facades\Schema; |
| 6 | + |
| 7 | +return new class extends Migration |
| 8 | +{ |
| 9 | + /** |
| 10 | + * Run the migrations. |
| 11 | + * |
| 12 | + * @return void |
| 13 | + */ |
| 14 | + public function up() |
| 15 | + { |
| 16 | + Schema::table(config('laravel-crm.db_table_prefix').'quote_products', function (Blueprint $table) { |
| 17 | + $table->integer('pipeline_stage_order')->nullable()->after('pipeline_stage_id'); |
| 18 | + }); |
| 19 | + |
| 20 | + Schema::table(config('laravel-crm.db_table_prefix').'order_products', function (Blueprint $table) { |
| 21 | + $table->integer('pipeline_stage_order')->nullable()->after('pipeline_stage_id'); |
| 22 | + }); |
| 23 | + |
| 24 | + Schema::table(config('laravel-crm.db_table_prefix').'invoice_lines', function (Blueprint $table) { |
| 25 | + $table->integer('pipeline_stage_order')->nullable()->after('pipeline_stage_id'); |
| 26 | + }); |
| 27 | + |
| 28 | + Schema::table(config('laravel-crm.db_table_prefix').'delivery_products', function (Blueprint $table) { |
| 29 | + $table->integer('pipeline_stage_order')->nullable()->after('pipeline_stage_id'); |
| 30 | + }); |
| 31 | + |
| 32 | + Schema::table(config('laravel-crm.db_table_prefix').'purchase_order_lines', function (Blueprint $table) { |
| 33 | + $table->integer('pipeline_stage_order')->nullable()->after('pipeline_stage_id'); |
| 34 | + }); |
| 35 | + } |
| 36 | + |
| 37 | + /** |
| 38 | + * Reverse the migrations. |
| 39 | + * |
| 40 | + * @return void |
| 41 | + */ |
| 42 | + public function down() |
| 43 | + { |
| 44 | + Schema::table(config('laravel-crm.db_table_prefix').'quote_products', function (Blueprint $table) { |
| 45 | + $table->dropColumn('pipeline_stage_order'); |
| 46 | + }); |
| 47 | + |
| 48 | + Schema::table(config('laravel-crm.db_table_prefix').'order_products', function (Blueprint $table) { |
| 49 | + $table->dropColumn('pipeline_stage_order'); |
| 50 | + }); |
| 51 | + |
| 52 | + Schema::table(config('laravel-crm.db_table_prefix').'invoice_lines', function (Blueprint $table) { |
| 53 | + $table->dropColumn('pipeline_stage_order');; |
| 54 | + }); |
| 55 | + |
| 56 | + Schema::table(config('laravel-crm.db_table_prefix').'delivery_products', function (Blueprint $table) { |
| 57 | + $table->dropColumn('pipeline_stage_order'); |
| 58 | + }); |
| 59 | + |
| 60 | + Schema::table(config('laravel-crm.db_table_prefix').'purchase_order_lines', function (Blueprint $table) { |
| 61 | + $table->dropColumn('pipeline_stage_order'); |
| 62 | + }); |
| 63 | + } |
| 64 | +}; |
0 commit comments