From b5705400a64b7649b7e31258d4392ee27c09747f Mon Sep 17 00:00:00 2001 From: Farid Saravi Date: Sun, 6 Oct 2019 22:11:53 +0330 Subject: [PATCH] add update migrations --- .../2019_08_23_152615_create_module_user.php | 37 -------------- .../2019_10_06_173827_temp_update_columns.php | 50 +++++++++++++++++++ 2 files changed, 50 insertions(+), 37 deletions(-) delete mode 100644 database/migrations/2019_08_23_152615_create_module_user.php create mode 100644 database/migrations/2019_10_06_173827_temp_update_columns.php diff --git a/database/migrations/2019_08_23_152615_create_module_user.php b/database/migrations/2019_08_23_152615_create_module_user.php deleted file mode 100644 index 5cd4a85..0000000 --- a/database/migrations/2019_08_23_152615_create_module_user.php +++ /dev/null @@ -1,37 +0,0 @@ -unsignedInteger('module_id'); - $table->unsignedInteger('user_id'); - $table->unique(['module_id', 'user_id']); - $table->index('module_id'); - $table->index('user_id'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - $dbName = config('core.db_name'); - Schema::dropIfExists("$dbName.module_user"); - } -} diff --git a/database/migrations/2019_10_06_173827_temp_update_columns.php b/database/migrations/2019_10_06_173827_temp_update_columns.php new file mode 100644 index 0000000..ad4a96d --- /dev/null +++ b/database/migrations/2019_10_06_173827_temp_update_columns.php @@ -0,0 +1,50 @@ +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() + { + + } +}