You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
willaengine/database/migrations/2019_10_06_173827_temp_upda...

51 lines
1.4 KiB

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class TempUpdateColumns extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$dbName = config('crm.db_name');
Schema::table("$dbName.clients", function (Blueprint $table) {
$table->string('father_name', 255)->nullable();
$table->string('telegram', 255)->nullable();
$table->string('website', 255)->nullable();
$table->text('description')->nullable();
$table->unsignedInteger('client_title_id')->nullable();
$table->foreign('client_title_id')->references('id')->on('client_titles');
$table->dropColumn('client_category_id');
});
Schema::table("$dbName.client_statuses", function (Blueprint $table) {
$table->string('color', 255)->nullable();
$table->string('icon', 255)->nullable();
});
$dbName = config('common.db_name');
Schema::table("$dbName.task_statuses", function (Blueprint $table) {
$table->string('color', 255)->nullable();
$table->string('icon', 255)->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
}
}