change the report/map routes into v2

This commit is contained in:
2024-02-18 08:33:19 +00:00
parent 25c33eb478
commit 8176faf117
123 changed files with 217538 additions and 216 deletions

View File

@@ -1,36 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateProvincesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('provinces', function (Blueprint $table) {
$table->tinyIncrements('id');
$table->string('name_fa');
$table->string('name_en')->nullable();
$table->unsignedTinyInteger('feature_id')->nullable();
$table->decimal('center_lat', 12, 10)->nullable();
$table->decimal('center_long', 12, 10)->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('provinces');
}
}

View File

@@ -1,41 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCitiesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('cities', function (Blueprint $table) {
$table->smallIncrements('id');
$table->unsignedTinyInteger('province_id');
$table->foreign('province_id')
->references('id')
->on('provinces');
$table->string('name_fa');
$table->string('name_en')->nullable();
$table->unsignedSmallInteger('feature_id')->nullable();
$table->unsignedTinyInteger('province_feature_id')->nullable();
$table->decimal('center_lat', 12, 10)->nullable();
$table->decimal('center_long', 12, 10)->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('cities');
}
}

View File

@@ -1,50 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('username')->unique();
$table->string('password');
$table->string('name')->nullable();
$table->string('first_name', 100)->nullable();
$table->string('last_name', 100)->nullable();
$table->string('email')->nullable();
$table->char('mobile', 11)->nullable();
$table->string('position')->nullable();
$table->unsignedTinyInteger('province_id')->nullable();
$table->foreign('province_id')
->references('id')
->on('provinces');
$table->unsignedSmallInteger('city_id')->nullable();
$table->foreign('city_id')
->references('id')
->on('cities');
$table->rememberToken();
$table->boolean('confirmed')->default(0);
$table->boolean('enabled')->default(1);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}

View File

@@ -1,36 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUserActivityLogsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('user_activity_logs', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->text('description');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('user_activity_logs');
}
}

View File

@@ -1,36 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateProjectFilesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('project_files', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('project_fileable_id');
$table->string('project_fileable_type');
$table->string('path');
$table->decimal('lat', 12, 10)->nullable();
$table->decimal('lng', 12, 10)->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('project_files');
}
}

View File

@@ -1,34 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePointFilesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('point_files', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('point_fileable_id');
$table->string('point_fileable_type');
$table->string('path');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('point_files');
}
}

View File

@@ -1,43 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRoadItemsProjectsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('road_items_projects', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->decimal('start_lat', 12, 10);
$table->decimal('start_lng', 12, 10);
$table->decimal('end_lat', 12, 10);
$table->decimal('end_lng', 12, 10);
$table->string('project_distance');
$table->unsignedTinyInteger('item');
$table->string('sub_items');
$table->json('sub_items_data')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('road_items_projects');
}
}

View File

@@ -1,67 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRoadConstructionProjectsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('road_construction_projects', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->unsignedTinyInteger('operation_type');
$table->string('operation_sub_types');
$table->decimal('start_lat', 12, 10);
$table->decimal('start_lng', 12, 10);
$table->decimal('end_lat', 12, 10);
$table->decimal('end_lng', 12, 10);
$table->string('project_distance');
$table->unsignedTinyInteger('province');
$table->unsignedTinyInteger('city');
$table->string('axis_name')->nullable();
$table->unsignedTinyInteger('axis_type');
$table->string('project_name')->nullable();
$table->unsignedTinyInteger('project_type');
$table->string('start_date')->nullable();
$table->string('consultant_name')->nullable();
$table->string('contractor_name')->nullable();
$table->string('ordered_credit');
$table->string('absorbed_credit');
$table->string('required_credit')->nullable();
$table->string('plan_number')->nullable();
$table->unsignedTinyInteger('plan_office')->nullable();
$table->string('announced_date')->nullable();
$table->string('credit_progress');
$table->string('physical_progress');
$table->text('project_problems')->nullable();
$table->unsignedTinyInteger('project_status');
$table->string('project_stop_reasons')->nullable();
$table->boolean('can_release')->default(0);
$table->string('release_date')->nullable();
$table->string('supervisor_name')->nullable();
$table->string('responsible_name')->nullable();
$table->string('report_date')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('road_construction_projects');
}
}

View File

@@ -1,40 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRoadPatrolProjectsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('road_patrol_projects', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->decimal('start_lat', 12, 10);
$table->decimal('start_lng', 12, 10);
$table->decimal('end_lat', 12, 10);
$table->decimal('end_lng', 12, 10);
$table->string('project_distance');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('road_patrol_projects');
}
}

View File

@@ -1,40 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRoadPatrolSubProjectsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('road_patrol_sub_projects', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('road_patrol_project_id');
$table->foreign('road_patrol_project_id')
->references('id')
->on('road_patrol_projects');
$table->decimal('project_lat', 12, 10);
$table->decimal('project_lng', 12, 10);
$table->unsignedTinyInteger('item');
$table->string('sub_items');
$table->json('sub_items_data')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('road_patrol_sub_projects');
}
}

View File

@@ -1,57 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRahdariPointsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('rahdari_points', function (Blueprint $table) {
$table->smallIncrements('id');
$table->unsignedTinyInteger('province_id')->nullable();
$table->foreign('province_id')
->references('id')
->on('provinces');
$table->unsignedSmallInteger('city_id')->nullable();
$table->foreign('city_id')
->references('id')
->on('cities');
$table->string('province_name')->nullable();
$table->string('city_name')->nullable();
$table->string('name')->nullable();
$table->string('status')->nullable();
$table->string('type')->nullable();
$table->string('team_num')->nullable();
$table->string('staff_num')->nullable();
$table->string('phone')->nullable();
$table->string('responsible_name')->nullable();
$table->string('responsible_mobile')->nullable();
$table->string('successor_name')->nullable();
$table->string('successor_mobile')->nullable();
$table->string('machines_light')->nullable();
$table->string('machines_sheavy')->nullable();
$table->string('machines_heavy')->nullable();
$table->string('code')->nullable();
$table->string('lat')->nullable();
$table->string('lng')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('rahdari_points');
}
}

View File

@@ -1,54 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRahdariPointHistoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('rahdari_point_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedSmallInteger('point_id');
$table->foreign('point_id')
->references('id')
->on('rahdari_points');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->string('previous_status')->nullable();
$table->string('previous_type')->nullable();
$table->string('previous_team_num')->nullable();
$table->string('previous_staff_num')->nullable();
$table->string('previous_phone')->nullable();
$table->string('previous_responsible_name')->nullable();
$table->string('previous_responsible_mobile')->nullable();
$table->string('previous_successor_name')->nullable();
$table->string('previous_successor_mobile')->nullable();
$table->string('previous_machines_light')->nullable();
$table->string('previous_machines_sheavy')->nullable();
$table->string('previous_machines_heavy')->nullable();
$table->string('previous_lat')->nullable();
$table->string('previous_lng')->nullable();
$table->text('new_files')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('rahdari_point_histories');
}
}

View File

@@ -1,57 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAccidentPointsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('accident_points', function (Blueprint $table) {
$table->smallIncrements('id');
$table->unsignedTinyInteger('province_id')->nullable();
$table->foreign('province_id')
->references('id')
->on('provinces');
$table->unsignedSmallInteger('city_id')->nullable();
$table->foreign('city_id')
->references('id')
->on('cities');
$table->string('lat');
$table->string('lng');
$table->string('priority')->nullable();
$table->string('code')->nullable();
$table->string('province')->nullable();
$table->string('axis_name')->nullable();
$table->string('axis_type')->nullable();
$table->string('axis_start')->nullable();
$table->string('axis_end')->nullable();
$table->string('native_name')->nullable();
$table->string('distance')->nullable();
$table->string('geometric_desc')->nullable();
$table->text('operation')->nullable();
$table->string('target')->nullable();
$table->string('cost')->default('0');
$table->string('progress')->default('0');
$table->string('end_date')->nullable();
$table->text('actions')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('accident_points');
}
}

View File

@@ -1,48 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAccidentPointHistoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('accident_point_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedSmallInteger('point_id');
$table->foreign('point_id')
->references('id')
->on('accident_points');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->string('previous_lat');
$table->string('previous_lng');
$table->text('previous_operation')->nullable();
$table->string('previous_target')->nullable();
$table->string('previous_cost')->nullable();
$table->string('previous_progress')->nullable();
$table->string('previous_end_date')->nullable();
$table->text('previous_actions')->nullable();
$table->text('new_files')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('accident_point_histories');
}
}

View File

@@ -1,56 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAccident251PointsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('accident_251_points', function (Blueprint $table) {
$table->smallIncrements('id');
$table->unsignedTinyInteger('province_id')->nullable();
$table->foreign('province_id')
->references('id')
->on('provinces');
$table->unsignedSmallInteger('city_id')->nullable();
$table->foreign('city_id')
->references('id')
->on('cities');
$table->unsignedSmallInteger('accident_point_id')->nullable();
$table->foreign('accident_point_id')
->references('id')
->on('accident_points');
$table->string('lat');
$table->string('lng');
$table->string('province')->nullable();
$table->string('axis_name')->nullable();
$table->string('axis_start')->nullable();
$table->string('axis_end')->nullable();
$table->string('native_name')->nullable();
$table->text('operation')->nullable();
$table->string('target')->nullable();
$table->string('cost')->nullable();
$table->string('progress')->nullable();
$table->string('end_date')->nullable();
$table->text('actions')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('accident_251_points');
}
}

View File

@@ -1,46 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAccident251PointsHistoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('accident_251_points_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedSmallInteger('point_id');
$table->foreign('point_id')
->references('id')
->on('accident_251_points');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->string('previous_lat');
$table->string('previous_lng');
$table->string('previous_cost')->nullable();
$table->string('previous_progress')->nullable();
$table->string('previous_end_date')->nullable();
$table->text('previous_actions')->nullable();
$table->text('new_files')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('accident_251_points_histories');
}
}

View File

@@ -1,51 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAbrarPlanProjectsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('abrar_plan_projects', function (Blueprint $table) {
$table->smallIncrements('id');
$table->unsignedTinyInteger('province_id');
$table->foreign('province_id')
->references('id')
->on('provinces');
$table->string('province_name')->nullable();
$table->unsignedSmallInteger('city_id')->nullable();
$table->foreign('city_id')
->references('id')
->on('cities');
$table->string('city_name')->nullable();
$table->text('axis_name')->nullable();
$table->string('axis_length')->nullable();
$table->string('project_type')->nullable();
$table->unsignedTinyInteger('project_status')->nullable();
$table->string('project_status_progress')->nullable();
$table->text('project_status_description')->nullable();
$table->string('project_status_date')->nullable();
$table->string('project_start_latlng')->nullable();
$table->string('project_end_latlng')->nullable();
$table->string('project_length')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('abrar_plan_projects');
}
}

View File

@@ -1,48 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAbrarPlanProjectHistoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('abrar_plan_project_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedSmallInteger('project_id');
$table->foreign('project_id')
->references('id')
->on('abrar_plan_projects');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->string('previous_type')->nullable();
$table->unsignedTinyInteger('previous_status')->nullable();
$table->string('previous_status_progress')->nullable();
$table->text('previous_status_description')->nullable();
$table->string('previous_status_date')->nullable();
$table->string('previous_start_latlng')->nullable();
$table->string('previous_end_latlng')->nullable();
$table->string('previous_length')->nullable();
$table->text('new_files')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('abrar_plan_project_histories');
}
}

View File

@@ -1,41 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRmsEventsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('rms_events', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->string('title');
$table->text('description')->nullable();
$table->string('path_file')->nullable();
$table->string('path_image')->nullable();
$table->timestamp('end_date', 0)->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('rms_events');
}
}

View File

@@ -1,41 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRmsEventHistoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('rms_event_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('rms_event_id');
$table->foreign('rms_event_id')
->references('id')
->on('rms_events');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->boolean('status');
$table->string('path_file')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('rms_event_histories');
}
}

View File

@@ -1,47 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateJaheshOperationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('jahesh_operations', function (Blueprint $table) {
$table->smallIncrements('id');
$table->unsignedTinyInteger('province_id');
$table->foreign('province_id')
->references('id')
->on('provinces');
$table->string('operation_1')->nullable();
$table->string('operation_2')->nullable();
$table->string('operation_3')->nullable();
$table->string('operation_4')->nullable();
$table->string('operation_5')->nullable();
$table->string('operation_6')->nullable();
$table->string('operation_7')->nullable();
$table->string('operation_8')->nullable();
$table->string('operation_9')->nullable();
$table->string('operation_10')->nullable();
$table->string('operation_11')->nullable();
$table->string('operation_12')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('jahesh_operations');
}
}

View File

@@ -1,51 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateJaheshOperationHistoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('jahesh_operation_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedSmallInteger('jahesh_operation_id');
$table->foreign('jahesh_operation_id')
->references('id')
->on('jahesh_operations');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->string('previous_operation_1')->nullable();
$table->string('previous_operation_2')->nullable();
$table->string('previous_operation_3')->nullable();
$table->string('previous_operation_4')->nullable();
$table->string('previous_operation_5')->nullable();
$table->string('previous_operation_6')->nullable();
$table->string('previous_operation_7')->nullable();
$table->string('previous_operation_8')->nullable();
$table->string('previous_operation_9')->nullable();
$table->string('previous_operation_10')->nullable();
$table->string('previous_operation_11')->nullable();
$table->string('previous_operation_12')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('jahesh_operation_histories');
}
}

View File

@@ -1,60 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRoadMaintenanceProjectsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('road_maintenance_projects', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->string('axis_name')->nullable();
$table->unsignedTinyInteger('axis_type')->nullable();
$table->string('project_name')->nullable();
$table->unsignedTinyInteger('province_id')->nullable();
$table->foreign('province_id')
->references('id')
->on('provinces');
$table->json('cities_id')->nullable();
$table->string('contractor_name')->nullable();
$table->string('consultant_name')->nullable();
$table->string('contract_date')->nullable();
$table->string('contract_credit')->nullable();
$table->string('start_latlng')->nullable();
$table->string('end_latlng')->nullable();
$table->timestamp('submited_at', 0)->nullable();
$table->timestamp('last_updated_at', 0)->nullable();
$table->json('project_distance')->nullable();
$table->json('project_distance_update')->nullable();
$table->string('contractor_credit')->nullable();
$table->text('description')->nullable();
$table->boolean('status')->default(0);
$table->boolean('project_status')->default(0);
$table->string('physical_progress')->nullable();
$table->unsignedTinyInteger('rate')->nullable();
$table->string('rate_desc')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('road_maintenance_projects');
}
}

View File

@@ -1,69 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRoadObservedsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('road_observeds', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('AutoID')->nullable();
$table->string('Title')->nullable();
$table->string('StartTime')->nullable();
$table->string('EndTime')->nullable();
$table->string('StartDate')->nullable();
$table->string('EndDate')->nullable();
$table->string('StartTime_DateTime')->nullable();
$table->string('EndTime_DateTime')->nullable();
$table->string('fk_RegisteredEventMessage')->nullable();
$table->string('fk_Country')->nullable();
$table->string('ProvinceName')->nullable();
$table->string('fk_Province')->nullable();
$table->string('fk_Town')->nullable();
$table->string('TownName')->nullable();
$table->string('lat')->nullable();
$table->string('lng')->nullable();
$table->string('XLAM')->nullable();
$table->string('YLAM')->nullable();
$table->string('WeatherName')->nullable();
$table->string('fk_Weather')->nullable();
$table->string('EventTypeTitle')->nullable();
$table->string('fk_EventType')->nullable();
$table->string('FeatureTypeTitle')->nullable();
$table->string('fk_FeatureType')->nullable();
$table->text('Description')->nullable();
$table->string('MobileForSendEventSms')->nullable();
$table->unsignedTinyInteger('rms_province_id')->nullable();
$table->foreign('rms_province_id')
->references('id')
->on('provinces');
$table->unsignedSmallInteger('rms_city_id')->nullable();
$table->foreign('rms_city_id')
->references('id')
->on('cities');
$table->boolean('rms_status')->default(0);
$table->string('rms_start_latlng')->nullable();
$table->string('rms_end_latlng')->nullable();
$table->text('rms_description')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('road_observeds');
}
}

View File

@@ -1,44 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRoadObservedHistoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('road_observed_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('problem_id');
$table->foreign('problem_id')
->references('id')
->on('road_observeds');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->boolean('previous_rms_status')->default(0);
$table->string('previous_rms_start_latlng')->nullable();
$table->string('previous_rms_end_latlng')->nullable();
$table->text('previous_rms_description')->nullable();
$table->text('new_files')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('road_observed_histories');
}
}

View File

@@ -1,71 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateDangerPointsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('danger_points', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('code')->nullable();
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->unsignedTinyInteger('province_id')->nullable();
$table->foreign('province_id')
->references('id')
->on('provinces');
$table->unsignedSmallInteger('city_id')->nullable();
$table->foreign('city_id')
->references('id')
->on('cities');
$table->string('axis_name')->nullable();
$table->unsignedTinyInteger('axis_type')->nullable();
$table->string('axis_start')->nullable();
$table->string('axis_end')->nullable();
$table->string('distance_axis_start')->nullable();
$table->string('local_name')->nullable();
$table->string('lat')->nullable();
$table->string('lng')->nullable();
$table->boolean('accident_251')->default(0);
$table->string('accident_251_code')->nullable();
$table->string('speed_limit')->nullable();
$table->string('speed_average')->nullable();
$table->boolean('accident_possibility')->nullable();
$table->boolean('road_guard')->nullable();
$table->unsignedTinyInteger('geometric_desc')->nullable();
$table->string('accident_cause')->nullable();
$table->text('accident_cause_suggest')->nullable();
$table->string('accident_severity')->nullable();
$table->text('accident_severity_suggest')->nullable();
$table->text('correction_plan_done')->nullable();
$table->text('correction_plan_doing')->nullable();
$table->text('correction_plan_doing_desc')->nullable();
$table->text('correction_plan_doing_suggest')->nullable();
$table->string('signature_file')->nullable();
$table->string('police_file')->nullable();
$table->boolean('status')->default(0);
$table->text('status_desc')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('danger_points');
}
}

View File

@@ -1,68 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateDangerPointHistoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('danger_point_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('point_id');
$table->foreign('point_id')
->references('id')
->on('danger_points');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->string('previous_code')->nullable();
$table->string('previous_axis_name')->nullable();
$table->unsignedTinyInteger('previous_axis_type')->nullable();
$table->string('previous_axis_start')->nullable();
$table->string('previous_axis_end')->nullable();
$table->string('previous_distance_axis_start')->nullable();
$table->string('previous_local_name')->nullable();
$table->string('previous_lat')->nullable();
$table->string('previous_lng')->nullable();
$table->boolean('previous_accident_251')->nullable();
$table->string('previous_accident_251_code')->nullable();
$table->string('previous_speed_limit')->nullable();
$table->string('previous_speed_average')->nullable();
$table->boolean('previous_accident_possibility')->nullable();
$table->boolean('previous_road_guard')->nullable();
$table->unsignedTinyInteger('previous_geometric_desc')->nullable();
$table->string('previous_accident_cause')->nullable();
$table->text('previous_accident_cause_suggest')->nullable();
$table->string('previous_accident_severity')->nullable();
$table->text('previous_accident_severity_suggest')->nullable();
$table->text('previous_correction_plan_done')->nullable();
$table->text('previous_correction_plan_doing')->nullable();
$table->text('previous_correction_plan_doing_desc')->nullable();
$table->text('previous_correction_plan_doing_suggest')->nullable();
$table->string('previous_signature_file')->nullable();
$table->string('previous_police_file')->nullable();
$table->boolean('previous_status')->nullable();
$table->text('previous_status_desc')->nullable();
$table->text('new_files')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('danger_point_histories');
}
}

View File

@@ -1,48 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateDangerPointAccidentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('danger_point_accidents', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('point_id');
$table->foreign('point_id')
->references('id')
->on('danger_points');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->string('serial_number')->unique('serial_number')->nullable();
$table->date('accident_date')->nullable();
$table->unsignedTinyInteger('day')->nullable();
$table->string('time')->nullable();
$table->unsignedTinyInteger('accident_direction')->nullable();
$table->unsignedTinyInteger('collision_type')->nullable();
$table->json('accident_factors')->nullable();
$table->unsignedTinyInteger('accident_type')->nullable();
$table->json('accident_result')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('danger_point_accidents');
}
}

View File

@@ -1,102 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePermissionTables extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$tableNames = config('permission.table_names');
$columnNames = config('permission.column_names');
Schema::create($tableNames['permissions'], function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('guard_name');
$table->timestamps();
});
Schema::create($tableNames['roles'], function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('guard_name');
$table->timestamps();
});
Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames, $columnNames) {
$table->unsignedBigInteger('permission_id');
$table->string('model_type');
$table->unsignedBigInteger($columnNames['model_morph_key']);
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_permissions_model_id_model_type_index');
$table->foreign('permission_id')
->references('id')
->on($tableNames['permissions'])
->onDelete('cascade');
$table->primary(['permission_id', $columnNames['model_morph_key'], 'model_type'],
'model_has_permissions_permission_model_type_primary');
});
Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames, $columnNames) {
$table->unsignedBigInteger('role_id');
$table->string('model_type');
$table->unsignedBigInteger($columnNames['model_morph_key']);
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_roles_model_id_model_type_index');
$table->foreign('role_id')
->references('id')
->on($tableNames['roles'])
->onDelete('cascade');
$table->primary(['role_id', $columnNames['model_morph_key'], 'model_type'],
'model_has_roles_role_model_type_primary');
});
Schema::create($tableNames['role_has_permissions'], function (Blueprint $table) use ($tableNames) {
$table->unsignedBigInteger('permission_id');
$table->unsignedBigInteger('role_id');
$table->foreign('permission_id')
->references('id')
->on($tableNames['permissions'])
->onDelete('cascade');
$table->foreign('role_id')
->references('id')
->on($tableNames['roles'])
->onDelete('cascade');
$table->primary(['permission_id', 'role_id'], 'role_has_permissions_permission_id_role_id_primary');
});
app('cache')
->store(config('permission.cache.store') != 'default' ? config('permission.cache.store') : null)
->forget(config('permission.cache.key'));
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
$tableNames = config('permission.table_names');
Schema::drop($tableNames['role_has_permissions']);
Schema::drop($tableNames['model_has_roles']);
Schema::drop($tableNames['model_has_permissions']);
Schema::drop($tableNames['roles']);
Schema::drop($tableNames['permissions']);
}
}

View File

@@ -1,60 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRoadConstructionRuralsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('road_construction_rurals', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->string('axis_name')->nullable();
$table->unsignedTinyInteger('axis_type')->nullable();
$table->string('project_name')->nullable();
$table->unsignedTinyInteger('province_id')->nullable();
$table->foreign('province_id')
->references('id')
->on('provinces');
$table->json('cities_id')->nullable();
$table->string('contractor_name')->nullable();
$table->string('consultant_name')->nullable();
$table->string('contract_date')->nullable();
$table->string('contract_credit')->nullable();
$table->string('start_latlng')->nullable();
$table->string('end_latlng')->nullable();
$table->timestamp('submited_at', 0)->nullable();
$table->timestamp('last_updated_at', 0)->nullable();
$table->json('project_distance')->nullable();
$table->json('project_distance_update')->nullable();
$table->string('contractor_credit')->nullable();
$table->string('physical_progress')->nullable();
$table->text('description')->nullable();
$table->boolean('status')->default(0);
$table->boolean('project_status')->default(0);
$table->unsignedTinyInteger('rate')->nullable();
$table->string('rate_desc')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('road_construction_rurals');
}
}

View File

@@ -1,62 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRoadConstructionRuralHistoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('road_construction_rural_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('project_id');
$table->foreign('project_id')
->references('id')
->on('road_construction_rurals');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->string('previous_axis_name')->nullable();
$table->unsignedTinyInteger('previous_axis_type')->nullable();
$table->string('previous_project_name')->nullable();
$table->json('previous_cities_id')->nullable();
$table->string('previous_contractor_name')->nullable();
$table->string('previous_consultant_name')->nullable();
$table->string('previous_contract_date')->nullable();
$table->string('previous_contract_credit')->nullable();
$table->string('previous_start_latlng')->nullable();
$table->string('previous_end_latlng')->nullable();
$table->string('previous_team_latlng')->nullable();
$table->string('previous_stop_reason')->nullable();
$table->timestamp('previous_submited_at', 0)->nullable();
$table->timestamp('previous_last_updated_at', 0)->nullable();
$table->json('previous_project_distance')->nullable();
$table->json('previous_project_distance_update')->nullable();
$table->string('previous_contractor_credit')->nullable();
$table->string('previous_physical_progress')->nullable();
$table->text('previous_description')->nullable();
$table->boolean('previous_status')->default(0);
$table->boolean('previous_project_status')->default(0);
$table->text('new_files')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('road_construction_rural_histories');
}
}

View File

@@ -1,61 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRoadTechnicalBuildingsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('road_technical_buildings', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->string('axis_name')->nullable();
$table->unsignedTinyInteger('axis_type')->nullable();
$table->string('project_name')->nullable();
$table->unsignedTinyInteger('province_id')->nullable();
$table->foreign('province_id')
->references('id')
->on('provinces');
$table->json('cities_id')->nullable();
$table->string('contractor_name')->nullable();
$table->string('consultant_name')->nullable();
$table->string('contract_date')->nullable();
$table->string('contract_credit')->nullable();
$table->string('start_latlng')->nullable();
$table->string('end_latlng')->nullable();
$table->timestamp('submited_at', 0)->nullable();
$table->timestamp('last_updated_at', 0)->nullable();
$table->json('project_distance')->nullable();
$table->json('project_distance_update')->nullable();
$table->string('contractor_credit')->nullable();
$table->string('physical_progress')->nullable();
$table->text('description')->nullable();
$table->boolean('status')->default(0);
$table->boolean('project_status')->default(0);
$table->text('project_describtion')->nullable();
$table->unsignedTinyInteger('rate')->nullable();
$table->string('rate_desc')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('road_technical_buildings');
}
}

View File

@@ -1,61 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRoadTechnicalBuildingHistoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('road_technical_building_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('project_id');
$table->foreign('project_id')
->references('id')
->on('road_technical_buildings');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->string('previous_axis_name')->nullable();
$table->unsignedTinyInteger('previous_axis_type')->nullable();
$table->string('previous_project_name')->nullable();
$table->json('previous_cities_id')->nullable();
$table->string('previous_contractor_name')->nullable();
$table->string('previous_consultant_name')->nullable();
$table->string('previous_contract_date')->nullable();
$table->string('previous_contract_credit')->nullable();
$table->string('previous_start_latlng')->nullable();
$table->string('previous_end_latlng')->nullable();
$table->string('previous_team_latlng')->nullable();
$table->string('previous_stop_reason')->nullable();
$table->timestamp('previous_submited_at', 0)->nullable();
$table->timestamp('previous_last_updated_at', 0)->nullable();
$table->json('previous_project_distance')->nullable();
$table->json('previous_project_distance_update')->nullable();
$table->string('previous_contractor_credit')->nullable();
$table->string('previous_physical_progress')->nullable();
$table->text('previous_description')->nullable();
$table->boolean('previous_status')->default(0);
$table->boolean('previous_project_status')->default(0);
$table->text('new_files')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('road_technical_building_histories');
}
}

View File

@@ -1,61 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRoadDangerPreventionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('road_danger_preventions', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->string('axis_name')->nullable();
$table->unsignedTinyInteger('axis_type')->nullable();
$table->string('project_name')->nullable();
$table->unsignedTinyInteger('province_id')->nullable();
$table->foreign('province_id')
->references('id')
->on('provinces');
$table->json('cities_id')->nullable();
$table->string('contractor_name')->nullable();
$table->string('consultant_name')->nullable();
$table->string('contract_date')->nullable();
$table->string('contract_credit')->nullable();
$table->string('start_latlng')->nullable();
$table->string('end_latlng')->nullable();
$table->timestamp('submited_at', 0)->nullable();
$table->timestamp('last_updated_at', 0)->nullable();
$table->json('project_distance')->nullable();
$table->json('project_distance_update')->nullable();
$table->string('contractor_credit')->nullable();
$table->string('physical_progress')->nullable();
$table->text('description')->nullable();
$table->boolean('status')->default(0);
$table->boolean('project_status')->default(0);
$table->text('project_description')->nullable();
$table->unsignedTinyInteger('rate')->nullable();
$table->string('rate_desc')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('road_danger_preventions');
}
}

View File

@@ -1,61 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRoadDangerPreventionHistoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('road_danger_prevention_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('project_id');
$table->foreign('project_id')
->references('id')
->on('road_danger_preventions');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->string('previous_axis_name')->nullable();
$table->unsignedTinyInteger('previous_axis_type')->nullable();
$table->string('previous_project_name')->nullable();
$table->json('previous_cities_id')->nullable();
$table->string('previous_contractor_name')->nullable();
$table->string('previous_consultant_name')->nullable();
$table->string('previous_contract_date')->nullable();
$table->string('previous_contract_credit')->nullable();
$table->string('previous_start_latlng')->nullable();
$table->string('previous_end_latlng')->nullable();
$table->string('previous_team_latlng')->nullable();
$table->string('previous_stop_reason')->nullable();
$table->timestamp('previous_submited_at', 0)->nullable();
$table->timestamp('previous_last_updated_at', 0)->nullable();
$table->json('previous_project_distance')->nullable();
$table->json('previous_project_distance_update')->nullable();
$table->string('previous_contractor_credit')->nullable();
$table->string('previous_physical_progress')->nullable();
$table->text('previous_description')->nullable();
$table->boolean('previous_status')->default(0);
$table->boolean('previous_project_status')->default(0);
$table->text('new_files')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('road_danger_prevention_histories');
}
}

View File

@@ -1,61 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRoadUpgradeSafetiesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('road_upgrade_safeties', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->string('axis_name')->nullable();
$table->unsignedTinyInteger('axis_type')->nullable();
$table->string('project_name')->nullable();
$table->unsignedTinyInteger('province_id')->nullable();
$table->foreign('province_id')
->references('id')
->on('provinces');
$table->json('cities_id')->nullable();
$table->string('contractor_name')->nullable();
$table->string('consultant_name')->nullable();
$table->string('contract_date')->nullable();
$table->string('contract_credit')->nullable();
$table->string('start_latlng')->nullable();
$table->string('end_latlng')->nullable();
$table->timestamp('submited_at', 0)->nullable();
$table->timestamp('last_updated_at', 0)->nullable();
$table->json('project_distance')->nullable();
$table->json('project_distance_update')->nullable();
$table->string('contractor_credit')->nullable();
$table->string('physical_progress')->nullable();
$table->text('description')->nullable();
$table->boolean('status')->default(0);
$table->boolean('project_status')->default(0);
$table->text('project_description')->nullable();
$table->unsignedTinyInteger('rate')->nullable();
$table->string('rate_desc')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('road_upgrade_safeties');
}
}

View File

@@ -1,61 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRoadUpgradeSafetyHistoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('road_upgrade_safety_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('project_id');
$table->foreign('project_id')
->references('id')
->on('road_upgrade_safeties');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->string('previous_axis_name')->nullable();
$table->unsignedTinyInteger('previous_axis_type')->nullable();
$table->string('previous_project_name')->nullable();
$table->json('previous_cities_id')->nullable();
$table->string('previous_contractor_name')->nullable();
$table->string('previous_consultant_name')->nullable();
$table->string('previous_contract_date')->nullable();
$table->string('previous_contract_credit')->nullable();
$table->string('previous_start_latlng')->nullable();
$table->string('previous_end_latlng')->nullable();
$table->string('previous_team_latlng')->nullable();
$table->string('previous_stop_reason')->nullable();
$table->timestamp('previous_submited_at', 0)->nullable();
$table->timestamp('previous_last_updated_at', 0)->nullable();
$table->json('previous_project_distance')->nullable();
$table->json('previous_project_distance_update')->nullable();
$table->string('previous_contractor_credit')->nullable();
$table->string('previous_physical_progress')->nullable();
$table->text('previous_description')->nullable();
$table->boolean('previous_status')->default(0);
$table->boolean('previous_project_status')->default(0);
$table->text('new_files')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('road_upgrade_safety_histories');
}
}

View File

@@ -1,61 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRoadTollhouseManagementsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('road_tollhouse_managements', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->string('axis_name')->nullable();
$table->unsignedTinyInteger('axis_type')->nullable();
$table->string('project_name')->nullable();
$table->unsignedTinyInteger('province_id')->nullable();
$table->foreign('province_id')
->references('id')
->on('provinces');
$table->json('cities_id')->nullable();
$table->string('contractor_name')->nullable();
$table->string('consultant_name')->nullable();
$table->string('contract_date')->nullable();
$table->string('contract_credit')->nullable();
$table->string('start_latlng')->nullable();
$table->string('end_latlng')->nullable();
$table->timestamp('submited_at', 0)->nullable();
$table->timestamp('last_updated_at', 0)->nullable();
$table->json('project_distance')->nullable();
$table->json('project_distance_update')->nullable();
$table->string('contractor_credit')->nullable();
$table->string('physical_progress')->nullable();
$table->text('description')->nullable();
$table->boolean('status')->default(0);
$table->boolean('project_status')->default(0);
$table->text('project_description')->nullable();
$table->unsignedTinyInteger('rate')->nullable();
$table->string('rate_desc')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('road_tollhouse_managements');
}
}

View File

@@ -1,61 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRoadTollhouseManagementHistoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('road_tollhouse_management_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('project_id');
$table->foreign('project_id')
->references('id')
->on('road_tollhouse_managements');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->string('previous_axis_name')->nullable();
$table->unsignedTinyInteger('previous_axis_type')->nullable();
$table->string('previous_project_name')->nullable();
$table->json('previous_cities_id')->nullable();
$table->string('previous_contractor_name')->nullable();
$table->string('previous_consultant_name')->nullable();
$table->string('previous_contract_date')->nullable();
$table->string('previous_contract_credit')->nullable();
$table->string('previous_start_latlng')->nullable();
$table->string('previous_end_latlng')->nullable();
$table->string('previous_team_latlng')->nullable();
$table->string('previous_stop_reason')->nullable();
$table->timestamp('previous_submited_at', 0)->nullable();
$table->timestamp('previous_last_updated_at', 0)->nullable();
$table->json('previous_project_distance')->nullable();
$table->json('previous_project_distance_update')->nullable();
$table->string('previous_contractor_credit')->nullable();
$table->string('previous_physical_progress')->nullable();
$table->text('previous_description')->nullable();
$table->boolean('previous_status')->default(0);
$table->boolean('previous_project_status')->default(0);
$table->text('new_files')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('road_tollhouse_management_histories');
}
}

View File

@@ -1,68 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCampsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('camps', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->unsignedTinyInteger('province_id')->nullable();
$table->foreign('province_id')
->references('id')
->on('provinces');
$table->string('province_fa')->nullable();
$table->string('axis_name')->nullable();
$table->unsignedTinyInteger('axis_type')->nullable();
$table->string('axis_type_fa')->nullable();
$table->unsignedTinyInteger('blockage_cause')->nullable();
$table->string('blockage_cause_fa')->nullable();
$table->unsignedTinyInteger('blockage_type')->nullable();
$table->unsignedTinyInteger('prediction_time')->nullable();
$table->string('prediction_time_fa')->nullable();
$table->string('blockage_type_fa')->nullable();
$table->string('blockage_length')->nullable();
$table->string('blockage_damage_money')->nullable();
$table->string('blockage_damage_count')->nullable();
$table->string('blockage_damage_lower_6_count')->nullable();
$table->string('blockage_damage_higher_6_count')->nullable();
$table->string('active_cars_count')->nullable();
$table->string('active_rahdar_count')->nullable();
$table->string('block_axis_desc')->nullable();
$table->unsignedTinyInteger('is_open')->nullable();
$table->string('is_open_type')->nullable();
$table->string('is_open_type_fa')->nullable();
$table->json('cities_id')->nullable();
$table->string('city_1_fa')->nullable();
$table->string('city_2_fa')->nullable();
$table->string('city_3_fa')->nullable();
$table->string('start_latlng')->nullable();
$table->string('end_latlng')->nullable();
$table->string('submited_at')->nullable();
$table->string('is_open_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('camps');
}
}

View File

@@ -1,44 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateBiBamasTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('bi_bamas', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedTinyInteger('project_type')->nullable();
$table->string('project_type_fa')->nullable();
$table->unsignedTinyInteger('axis_type')->nullable();
$table->string('axis_type_fa')->nullable();
$table->unsignedTinyInteger('rate')->nullable();
$table->string('rate_fa')->nullable();
$table->unsignedTinyInteger('project_status')->nullable();
$table->string('project_status_fa')->nullable();
$table->string('contract_date')->nullable();
$table->unsignedTinyInteger('province_id')->nullable();
$table->string('province_fa')->nullable();
$table->unsignedTinyInteger('city_id')->nullable();
$table->string('city_fa')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('bi_bamas');
}
}

View File

@@ -1,32 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRoutePathsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('route_paths', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('lat1');
$table->string('lng1');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('route_paths');
}
}

View File

@@ -1,64 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCmmsDemosTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('cmms_demos', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('car_name')->nullable();
$table->tinyInteger('car_group')->nullable();
$table->string('car_group_fa')->nullable();
$table->tinyInteger('car_type')->nullable();
$table->string('car_type_fa')->nullable();
$table->string('machine_code')->nullable();
$table->string('estate_no')->nullable();
$table->string('build_date')->nullable();
$table->string('car_color')->nullable();
$table->string('plak_number')->nullable();
$table->string('plak_number_right')->nullable();
$table->string('plak_number_left')->nullable();
$table->string('plak_number_center')->nullable();
$table->string('plak_number_char')->nullable();
$table->string('body_number')->nullable();
$table->string('dam_number')->nullable();
$table->string('motor_number')->nullable();
$table->string('vin_number')->nullable();
$table->tinyInteger('section')->nullable();
$table->string('section_fa')->nullable();
$table->string('gps_code')->nullable();
$table->string('driver_name')->nullable();
$table->string('last_work_value')->nullable();
$table->string('unit_name')->nullable();
$table->string('status_fa')->nullable();
$table->tinyInteger('status')->nullable();
$table->string('repair_hourly_price')->nullable();
$table->tinyInteger('unit_group')->nullable();
$table->string('unit_group_fa')->nullable();
$table->string('res1')->nullable();
$table->string('mobile')->nullable();
$table->tinyInteger('category')->nullable();
$table->string('category_fa')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('cmms_demos');
}
}

View File

@@ -1,51 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateBBProjectIndicatorsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('b_b_project_indicators', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('project_province_fa')->nullable();
$table->unsignedTinyInteger('project_province_id')->nullable();
$table->string('project_plan_fa')->nullable();
$table->unsignedTinyInteger('project_plan_id')->nullable();
$table->string('project_office_fa')->nullable();
$table->unsignedTinyInteger('project_office_id')->nullable();
$table->string('province_fa')->nullable();
$table->unsignedTinyInteger('province_id')->nullable();
$table->string('city_fa')->nullable();
$table->unsignedTinyInteger('city_id')->nullable();
$table->string('project_indicator_fa')->nullable();
$table->unsignedTinyInteger('project_indicator_id')->nullable();
$table->unsignedTinyInteger('project_year')->nullable();
$table->string('project_name')->nullable();
$table->string('project_related')->nullable();
$table->string('project_axis')->nullable();
$table->unsignedBigInteger('project_accept_value')->nullable();
$table->unsignedBigInteger('project_communicate_value')->nullable();
$table->unsignedBigInteger('project_allocate_value')->nullable();
$table->unsignedBigInteger('project_unique_id')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('b_b_project_indicators');
}
}

View File

@@ -1,46 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateBBOpeningsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('b_b_openings', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('car_name')->nullable();
$table->string('deputy_district')->nullable();
$table->string('province_fa')->nullable();
$table->unsignedTinyInteger('province_id')->nullable();
$table->foreign('province_id')
->references('id')
->on('provinces');
$table->string('activity')->nullable();
$table->text('plan_id')->nullable();
$table->text('plan_fa')->nullable();
$table->string('project_title')->nullable();
$table->text('unit')->nullable();
$table->float('amount')->nullable();
$table->mediumInteger('national_consumer_credit')->nullable();
$table->mediumInteger('province_consumer_credit')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('b_b_openings');
}
}

View File

@@ -1,42 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateBBJaheshesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('b_b_jaheshes', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('province_fa')->nullable();
$table->unsignedTinyInteger('province_id')->nullable();
$table->foreign('province_id')
->references('id')
->on('provinces');
$table->tinyInteger('project_type')->nullable();
$table->unsignedTinyInteger('plan_id')->nullable();
$table->double('plan_fa')->nullable();
$table->double('project_count_all')->nullable();
$table->double('project_count_done')->nullable();
$table->string('project_progress')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('b_b_jaheshes');
}
}

View File

@@ -1,41 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateBBPrioritiesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('b_b_priorities', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('province')->nullable();
$table->tinyInteger('province_id')->nullable();
$table->string('assistance')->nullable();
$table->tinyInteger('assistance_id')->nullable();
$table->string('office')->nullable();
$table->tinyInteger('office_id')->nullable();
$table->string('project_title')->nullable();
$table->double('credits_required')->nullable();
$table->string('project_completion')->nullable();
$table->string('project_completion_id')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('b_b_priorities');
}
}

View File

@@ -1,35 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateWeatherNoticesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('weather_notices', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('type')->nullable();
$table->string('color')->nullable();
$table->string('notice_code')->nullable();
$table->text('notice_text')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('weather_notices');
}
}

View File

@@ -1,45 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateResearchDevTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('research_devs', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedTinyInteger('province_id')->nullable();
$table->string('province_fa')->nullable();
$table->string('project_title')->nullable();
$table->string('contract_date')->nullable();
$table->unsignedTinyInteger('contract_num')->nullable();
$table->float('contract_amount')->nullable();
$table->unsignedTinyInteger('contract_condition_id')->nullable();
$table->unsignedTinyInteger('domain_id')->nullable();
$table->string('domain_fa')->nullable();
$table->string('contract_condition_fa')->nullable();
$table->string('last_report')->nullable();
$table->string('file_name')->nullable();
$table->string('executer')->nullable();
$table->string('uid_file')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('research_devs');
}
}

View File

@@ -1,65 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCoridorsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('coridors', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedTinyInteger('province_id')->nullable();
$table->foreign('province_id')
->references('id')
->on('provinces');
$table->unsignedSmallInteger('city_id')->nullable();
$table->foreign('city_id')
->references('id')
->on('cities');
$table->string('province_name')->nullable();
$table->string('city_name')->nullable();
$table->string('name')->nullable();
$table->string('status')->nullable();
$table->string('type')->nullable();
$table->string('team_num')->nullable();
$table->string('staff_num')->nullable();
$table->string('phone')->nullable();
$table->string('responsible_name')->nullable();
$table->string('responsible_mobile')->nullable();
$table->string('successor_name')->nullable();
$table->string('successor_mobile')->nullable();
$table->string('machines_light')->nullable();
$table->string('machines_sheavy')->nullable();
$table->string('machines_heavy')->nullable();
$table->string('code')->nullable();
$table->string('lat')->nullable();
$table->string('lng')->nullable();
$table->string('machine_data',500)->nullable();
$table->string('team_data',500)->nullable();
$table->string('start_lat')->nullable();
$table->string('start_lng')->nullable();
$table->string('end_lat')->nullable();
$table->string('end_lng')->nullable();
$table->string('color')->nullable();
$table->mediumText('geometry')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('coridors_models');
}
}

View File

@@ -1,43 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateNewRandDSTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('new_rand_d_s', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('project_title')->nullable();
$table->string('province_fa')->nullable();
$table->string('domain_fa')->nullable();
$table->string('proj_etimate_amount')->nullable();
$table->string('proj_credit_state')->nullable();
$table->string('proj_credit_resource')->nullable();
$table->string('proj_agents')->nullable();
$table->string('proj_rfp_file')->nullable();
$table->string('proj_justification_file')->nullable();
$table->string('proj_regby_name')->nullable();
$table->string('proj_regby_family')->nullable();
$table->string('proj_regby_phone')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('new_rand_d_s');
}
}

View File

@@ -1,35 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateContactusesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('contactuses', function (Blueprint $table) {
$table->bigIncrements('id');/////'c_name', 'c_phone', 'c_title', 'c_describe'
$table->string('c_name');
$table->string('c_phone');
$table->string('c_title');
$table->string('c_describe');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('contactuses');
}
}

View File

@@ -1,36 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddExpertInformationToReaserchDevs extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('research_devs', function (Blueprint $table) {
$table->string('expert_firstname');
$table->string('expert_lastname');
$table->string('expert_phone');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('reaserch_devs', function (Blueprint $table) {
$table->dropColumn('expert_firstname');
$table->dropColumn('expert_lastname');
$table->dropColumn('expert_phone');
});
}
}

View File

@@ -1,31 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddProvinceCityNameToUsers extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->string('avatar')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('avatar');
});
}
}

View File

@@ -1,44 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateNewRAndD extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('new_randd', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('title');
$table->string('province_id');
$table->string('province_fa');
$table->string('domain_fa');
$table->string('project_amount');
$table->boolean('credit_status');
$table->string('rfp_file');
$table->string('unique_code');
$table->string('created_time_jalali');
$table->string('fname_creator');
$table->string('lname_creator');
$table->string('phone_creator');
$table->boolean('operation_status')->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('new_randd');
}
}

View File

@@ -1,37 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePasswordResetsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('password_resets', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('username');
$table->string('token');
$table->string('code');
$table->boolean('code_status')->nullable();
$table->boolean('status')->default(0);
$table->timestamp('expired_at');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('password_resets');
}
}

View File

@@ -1,32 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddProjCreditResourseToNewRandd extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('new_randd', function (Blueprint $table) {
$table->bigInteger('proj_credit_resourse')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('new_randd', function (Blueprint $table) {
//
});
}
}

View File

@@ -1,32 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddDomainIdToResearchDevs extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('research_devs', function (Blueprint $table) {
$table->string('domain_id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('research_devs', function (Blueprint $table) {
$table->dropColumn('domain_id');
});
}
}

View File

@@ -1,35 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRandDMembersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('rand_d_members', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('member_name');
$table->string('member_url');
$table->string('member_duty');
$table->string('member_office');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('rand_d_members');
}
}

View File

@@ -1,120 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCmmsFormsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('cmms_forms', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('dedicated_number')->nullable();
$table->string('chassis_number')->nullable();
$table->bigInteger('province_id')->nullable();
$table->string('province_fa')->nullable();
$table->bigInteger('city_id')->nullable();
$table->string('city_fa')->nullable();
$table->string('device_name')->nullable();
$table->string('operator_name')->nullable();
$table->string('operator_nationalcode')->nullable();
$table->string('form_number')->nullable();
$table->enum('car_type', ['B', 'L', 'G', 'Ex'])->nullable();
/* Technical Specifications */
$table->string('motor')->nullable();
$table->text('motor_description')->nullable();
$table->integer('motor_score')->nullable();
$table->string('power')->nullable();
$table->text('power_description')->nullable();
$table->integer('power_score')->nullable();
$table->string('zirbandi')->nullable();
$table->text('zirbandi_description')->nullable();
$table->integer('zirbandi_score')->nullable();
$table->string('chassis')->nullable();
$table->text('chassis_description')->nullable();
$table->integer('chassis_score')->nullable();
$table->string('electrical')->nullable();
$table->text('electrical_description')->nullable();
$table->integer('electrical_score')->nullable();
$table->string('safety')->nullable();
$table->text('safety_description')->nullable();
$table->integer('safety_score')->nullable();
$table->string('gps')->nullable();
$table->text('gps_description')->nullable();
$table->integer('gps_score')->nullable();
$table->string('color')->nullable();
$table->text('color_description')->nullable();
$table->integer('color_score')->nullable();
$table->string('bucket')->nullable();
$table->text('bucket_description')->nullable();
$table->integer('bucket_score')->nullable();
$table->string('hydraulic')->nullable();
$table->text('hydraulic_description')->nullable();
$table->integer('hydraulic_score')->nullable();
$table->string('jolobandi')->nullable();
$table->text('jolobandi_description')->nullable();
$table->integer('jolobandi_score')->nullable();
$table->string('ripper')->nullable();
$table->text('ripper_description')->nullable();
$table->integer('ripper_score')->nullable();
$table->string('service_status')->nullable();
$table->text('service_description')->nullable();
$table->string('fuel_form')->nullable();
$table->text('fuel_description')->nullable();
$table->boolean('question1')->nullable();
$table->boolean('question2')->nullable();
$table->boolean('question3')->nullable();
$table->boolean('question4')->nullable();
$table->boolean('question5')->nullable();
$table->string('auditor_name')->nullable();
$table->string('auditor_position')->nullable();
$table->string('member1_name')->nullable();
$table->string('member1_position')->nullable();
$table->string('member2_name')->nullable();
$table->string('member2_position')->nullable();
$table->string('member3_name')->nullable();
$table->string('member3_position')->nullable();
$table->bigInteger('total_points')->nullable();
$table->string('image1')->nullable();
$table->string('image2')->nullable();
$table->string('image3')->nullable();
$table->string('file1')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('cmms_forms');
}
}

View File

@@ -1,34 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCmmsProvince extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('cmms_province', function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('province_id');
$table->string('province_fa');
$table->bigInteger('area_code');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('cmms_province');
}
}

View File

@@ -1,44 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCmmsFormsHistoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('cmms_forms_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('cmms_form_id');
$table->foreign('cmms_form_id')->references('id')->on('cmms_forms')->onUpdate('cascade');
$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users');
$table->string('previous_chassis_number')->nullable();
$table->string('previous_province_id')->nullable();
$table->string('previous_province_fa')->nullable();
$table->string('previous_city_id')->nullable();
$table->string('previous_city_fa')->nullable();
$table->string('previous_device_name')->nullable();
$table->string('previous_operator_name')->nullable();
$table->string('previous_operator_nationalcode')->nullable();
$table->string('previous_operator_phone')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('cmms_forms_histories');
}
}

View File

@@ -1,48 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateModelsContractsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('contracts', function (Blueprint $table) {
$table->bigIncrements('id');
$table->integer('province_id');
$table->string('province_fa');
$table->integer('office_id');
$table->string('office_fa');
$table->string('title');
$table->integer('status_id');
$table->string('status_fa');
$table->string('contract_date');
$table->string('contract_mojavez');
$table->string('contract_mojavez_fa');
$table->string('contract_tarh');
$table->string('contract_credit_national');
$table->string('contract_credit_province');
$table->string('contract_credit');
$table->string('contract_peymankar');
$table->string('contract_moshaver_tarahi');
$table->string('contract_moshaver_nezarat');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('contracts');
}
}

View File

@@ -1,40 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateContractMojavezSetadsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('contract_mojavez_setads', function (Blueprint $table) {
$table->bigIncrements('id');
$table->integer('province_id');
$table->string('province_fa');
$table->integer('office_id');
$table->string('office_fa');
$table->string('title');
$table->string('mojavez_date');
$table->string('tarh_number_1')->nullable();
$table->string('tarh_number_2')->nullable();
$table->string('tarh_number_3')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('contract_mojavez_setads');
}
}

View File

@@ -1,45 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateContractEblaghMelisTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('contract_eblagh_melis', function (Blueprint $table) {
$table->bigIncrements('id');
$table->integer('province_id');
$table->string('province_fa');
$table->integer('office_id');
$table->string('office_fa');
$table->string('unit_fa');
$table->integer('unit_id');
$table->string('tarh_number');
$table->string('credit_eblagh');
$table->string('credit_public');
$table->string('credit_public_type_id');
$table->string('credit_public_type_fa');
$table->string('credit_public_describe');
$table->string('credit_eblagh_other');
$table->string('credit_takhsis_other');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('contract_eblagh_melis');
}
}

View File

@@ -1,62 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateContractSubitemsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('contract_subitems', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('project_title')->nullable();
$table->string('project_type_id')->nullable();
$table->string('project_type_fa')->nullable();
$table->string('operation_type_id')->nullable();
$table->string('operation_type_fa')->nullable();
$table->string('city_id')->nullable();
$table->string('city_fa')->nullable();
$table->string('province_id')->nullable();
$table->string('province_fa')->nullable();
$table->string('axis_type_id')->nullable();
$table->string('axis_type_fa')->nullable();
$table->string('axis_name_id')->nullable();
$table->string('axis_name_fa')->nullable();
$table->string('lat')->nullable();
$table->string('lng')->nullable();
$table->string('followup_priority_project')->nullable();
$table->string('priority_project')->nullable();
$table->string('operator_name')->nullable();
$table->string('progress_project')->nullable();
$table->string('created_at_fa')->nullable();
$table->string('last_status_id')->nullable();
$table->string('last_status_fa')->nullable();
$table->string('last_digit_project')->nullable();
$table->string('last_function_operator')->nullable();
$table->string('last_payable_operator')->nullable();
$table->string('complete_payable')->nullable();
$table->string('updated_at_fa')->nullable();
$table->string('image_path')->nullable();
$table->string('unique_code');
$table->bigInteger('contract_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('contract_subitems');
}
}

View File

@@ -1,48 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateContractSubItemsHistoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('contract_sub_items_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('progress_project')->nullable();
$table->string('last_status_id')->nullable();
$table->string('last_status_fa')->nullable();
$table->string('image1')->nullable();
$table->string('image2')->nullable();
$table->string('operation_type_progress1')->nullable();
$table->string('operation_type_progress2')->nullable();
$table->string('operation_type_progress3')->nullable();
$table->string('operation_type_progress4')->nullable();
$table->string('last_digit_project')->nullable();
$table->string('last_function_operator')->nullable();
$table->string('last_payable_operator')->nullable();
$table->string('complete_payable')->nullable();
$table->string('created_at_fa')->nullable();
$table->String('updated_at_fa')->nullable();
$table->unsignedBigInteger('subitem_id');
$table->foreign('subitem_id')->references('id')->on('contract_subitems');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('contract_sub_items_histories');
}
}

View File

@@ -1,70 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddFieldsToContractSubItemsHistories extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('contract_sub_items_histories', function (Blueprint $table) {
$table->string('project_title')->nullable();
$table->string('project_type_id')->nullable();
$table->string('project_type_fa')->nullable();
$table->string('operation_type_id')->nullable();
$table->string('operation_type_fa')->nullable();
$table->string('city_id')->nullable();
$table->string('city_fa')->nullable();
$table->string('province_id')->nullable();
$table->string('province_fa')->nullable();
$table->string('axis_type_id')->nullable();
$table->string('axis_type_fa')->nullable();
$table->string('axis_name_id')->nullable();
$table->string('axis_name_fa')->nullable();
$table->string('lat')->nullable();
$table->string('lng')->nullable();
$table->string('followup_priority_project')->nullable();
$table->string('priority_project')->nullable();
$table->string('operator_name')->nullable();
$table->string('image_path')->nullable();
$table->string('unique_code');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('contract_sub_items_histories', function (Blueprint $table) {
$table->dropColumn('project_title');
$table->dropColumn('project_type_id');
$table->dropColumn('project_type_fa');
$table->dropColumn('operation_type_id');
$table->dropColumn('operation_type_fa');
$table->dropColumn('city_id');
$table->dropColumn('city_fa');
$table->dropColumn('province_id');
$table->dropColumn('province_fa');
$table->dropColumn('axis_type_id');
$table->dropColumn('axis_type_fa');
$table->dropColumn('axis_name_id');
$table->dropColumn('axis_name_fa');
$table->dropColumn('lat');
$table->dropColumn('lng');
$table->dropColumn('followup_priority_project');
$table->dropColumn('priority_project');
$table->dropColumn('operator_name');
$table->dropColumn('image_path');
$table->dropColumn('unique_code');
});
}
}

View File

@@ -1,37 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRandDVotingsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('randd_votings', function (Blueprint $table) {
$table->bigIncrements('id');
$table->Integer('project_id')->unsigned();
$table->foreign('project_id')->references('id')->on('new_randd');
$table->text('description')->nullable();
$table->tinyInteger('status');
$table->Integer('user_id')->unsigned();
$table->foreign('user_id')->references('id')->on('users');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('randd_votings');
}
}

View File

@@ -1,41 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRandDVotingPaperAnswersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('randd_voting_paper_answers', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('vote_id');
$table->foreign('vote_id')->references('id')->on('randd_votings')->onDelete('cascade');
$table->bigInteger('score');
$table->tinyInteger('score_type');
$table->text('description')->nullable();
$table->integer('user_id')->unsigned();
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
$table->bigInteger('q_id');
$table->string('q_fa');
$table->string('fullname')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('randd_voting_paper_answers');
}
}

View File

@@ -1,79 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class NewCsiHistory extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('contract_sub_items_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('project_title')->nullable();
$table->string('project_type_id');
$table->string('project_type_fa');
$table->string('operation_type_id1')->nullable();
$table->string('operation_type_fa1')->nullable();
$table->string('operation_type_amount1')->nullable();
$table->string('operation_type_progress1')->nullable();
$table->string('operation_type_id2')->nullable();
$table->string('operation_type_fa2')->nullable();
$table->string('operation_type_amount2')->nullable();
$table->string('operation_type_progress2')->nullable();
$table->string('operation_type_id3')->nullable();
$table->string('operation_type_fa3')->nullable();
$table->string('operation_type_amount3')->nullable();
$table->string('operation_type_progress3')->nullable();
$table->string('operation_type_id4')->nullable();
$table->string('operation_type_fa4')->nullable();
$table->string('operation_type_amount4')->nullable();
$table->string('operation_type_progress4')->nullable();
$table->string('city_id')->nullable();
$table->string('city_fa')->nullable();
$table->string('province_id')->nullable();
$table->string('province_fa')->nullable();
$table->string('axis_type_id')->nullable();
$table->string('axis_type_fa')->nullable();
$table->string('axis_name_id')->nullable();
$table->string('axis_name_fa')->nullable();
$table->string('start_lat')->nullable();
$table->string('end_lat')->nullable();
$table->string('start_lng')->nullable();
$table->string('end_lng')->nullable();
$table->string('followup_priority_project')->nullable();
$table->string('priority_project')->nullable();
$table->string('operator_name')->nullable();
$table->string('operator_phone')->nullable();
$table->string('updated_at_fa')->nullable();
$table->string('created_at_fa')->nullable();
$table->string('last_status_id')->nullable();
$table->string('last_status_fa')->nullable();
$table->string('last_digit_project')->nullable();
$table->string('last_function_operator')->nullable();
$table->string('last_payable_operator')->nullable();
$table->string('complete_payable')->nullable();
$table->string('image_path1')->nullable();
$table->string('image_path2')->nullable();
$table->string('unique_code')->nullable();
$table->unsignedBigInteger('subitem_id')->nullable();
$table->foreign('subitem_id')->references('id')->on('contract_subitems');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('contract_sub_items_histories');
}
}

View File

@@ -1,32 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UpdateRmsEventsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('rms_events', function (Blueprint $table) {
$table->boolean('archived')->default(0)->after('end_date');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('rms_events', function (Blueprint $table) {
$table->dropColumn('archived');
});
}
}

View File

@@ -1,34 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UpdateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->string('degree')->nullable()->after('position');
$table->string('photo')->nullable()->after('city_id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('degree');
$table->dropColumn('photo');
});
}
}

View File

@@ -1,61 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRoadMaintenanceProjectHistoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('road_maintenance_project_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('project_id');
$table->foreign('project_id')
->references('id')
->on('road_maintenance_projects');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->string('previous_axis_name')->nullable();
$table->unsignedTinyInteger('previous_axis_type')->nullable();
$table->string('previous_project_name')->nullable();
$table->json('previous_cities_id')->nullable();
$table->string('previous_contractor_name')->nullable();
$table->string('previous_consultant_name')->nullable();
$table->string('previous_contract_date')->nullable();
$table->string('previous_contract_credit')->nullable();
$table->string('previous_start_latlng')->nullable();
$table->string('previous_end_latlng')->nullable();
$table->string('previous_team_latlng')->nullable();
$table->string('previous_stop_reason')->nullable();
$table->timestamp('previous_submited_at', 0)->nullable();
$table->timestamp('previous_last_updated_at', 0)->nullable();
$table->json('previous_project_distance')->nullable();
$table->json('previous_project_distance_update')->nullable();
$table->string('previous_contractor_credit')->nullable();
$table->string('previous_physical_progress')->nullable();
$table->text('previous_description')->nullable();
$table->boolean('previous_status')->default(0);
$table->boolean('previous_project_status')->default(0);
$table->text('new_files')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('road_maintenance_project_histories');
}
}

View File

@@ -1,37 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UpdateRoadMaintenanceProjects10JunTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('road_maintenance_projects', function (Blueprint $table) {
//$table->string('consultant_name')->nullable()->after('contractor_name');
$table->json('project_distance_update')->nullable()->after('project_distance');
});
Schema::table('road_maintenance_project_histories', function (Blueprint $table) {
$table->json('previous_project_distance_update')->nullable()->after('previous_project_distance');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('road_maintenance_projects', function (Blueprint $table) {
$table->dropColumn('consultant_name');
});
}
}

View File

@@ -1,37 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UpdateRoadMaintenanceProjectsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('road_maintenance_projects', function (Blueprint $table) {
//$table->string('consultant_name')->nullable()->after('contractor_name');
$table->json('project_distance_update')->nullable()->after('project_distance');
});
Schema::table('road_maintenance_project_histories', function (Blueprint $table) {
$table->json('previous_project_distance_update')->nullable()->after('previous_project_distance');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('road_maintenance_projects', function (Blueprint $table) {
$table->dropColumn('consultant_name');
});
}
}

View File

@@ -1,34 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRoadObservedsUpdateTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('road_observeds', function (Blueprint $table) {
//$table->string('consultant_name')->nullable()->after('contractor_name');
$table->string('fk_Town')->nullable()->after('fk_Province');
$table->string('TownName')->nullable()->after('fk_Province');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('road_observeds', function (Blueprint $table) {
//$table->dropColumn('consultant_name');
});
}
}

View File

@@ -1,60 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRoadConstructionRuralHistoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('road_construction_rural_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('project_id');
$table->foreign('project_id')
->references('id')
->on('road_maintenance_projects');
$table->unsignedInteger('user_id');
$table->foreign('user_id')
->references('id')
->on('users');
$table->string('previous_axis_name')->nullable();
$table->unsignedTinyInteger('previous_axis_type')->nullable();
$table->string('previous_project_name')->nullable();
$table->json('previous_cities_id')->nullable();
$table->string('previous_contractor_name')->nullable();
$table->string('previous_consultant_name')->nullable();
$table->string('previous_contract_date')->nullable();
$table->string('previous_contract_credit')->nullable();
$table->string('previous_start_latlng')->nullable();
$table->string('previous_end_latlng')->nullable();
$table->timestamp('previous_submited_at', 0)->nullable();
$table->timestamp('previous_last_updated_at', 0)->nullable();
$table->json('previous_project_distance')->nullable();
$table->json('previous_project_distance_update')->nullable();
$table->string('previous_contractor_credit')->nullable();
$table->string('previous_physical_progress')->nullable();
$table->text('previous_description')->nullable();
$table->boolean('previous_status')->default(0);
$table->boolean('previous_project_status')->default(0);
$table->text('new_files')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('road_construction_rural_histories');
}
}