File: /var/www/ipsremont-demo/database/migrations/2020_12_11_190247_add_fields_service.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddFieldsService extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('services', function (Blueprint $table) {
$table->string('external_warehouse_id', 50)->comment('код склада в 1с')->nullable();
$table->index('external_warehouse_id');
$table->integer('warehouse_id')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('services', function (Blueprint $table) {
$table->dropColumn('external_storage_id');
$table->dropColumn('warehouse_id');
});
}
}