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

@@ -0,0 +1,32 @@
<?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

@@ -0,0 +1,34 @@
<?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

@@ -0,0 +1,61 @@
<?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

@@ -0,0 +1,37 @@
<?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

@@ -0,0 +1,37 @@
<?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

@@ -0,0 +1,34 @@
<?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

@@ -0,0 +1,60 @@
<?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');
}
}