добавляю все изменения проекта на текущий момент
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Taxi\Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class TaxiDatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// $this->call([]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('taxi_main', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('emp_login', 30)->comment('логин сотрудника кто поедет');
|
||||
$table->string('emp_phone', 15)->comment('телефон сотрудника');
|
||||
$table->date('taxi_date')->comment('дата заказа такси');
|
||||
$table->time('taxi_time')->comment('время заказа такси');
|
||||
$table->string('taxi_address', 500)->comment('адрес заказа такси');
|
||||
$table->boolean('archive')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('taxi_main');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('taxi_hist', function (Blueprint $table) {
|
||||
$table->id('hist_id');
|
||||
$table->integer('id_change_row')->default(NULL)->comment('id изменяемой строки');
|
||||
$table->string('table_name', 50)->default(NULL)->comment('имя изменямой таблицы');
|
||||
$table->string('field_name', 50)->default(NULL)->comment('имя изменяемого поля');
|
||||
$table->string('emp_login', 50)->default(NULL)->comment('логин сотрудника, внесшего изменение');
|
||||
$table->string('value_before', 500)->default(NULL)->comment('значение ДО');
|
||||
$table->string('value_after', 500)->default(NULL)->comment('значение ПОСЛЕ');
|
||||
$table->timestamps();
|
||||
$table->comment('Таблица с историей изменений по процессу Заказ такси');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('taxi_hist');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('taxi_time_period', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('time_period', 5)->comment('Временнoй промежуток');
|
||||
$table->boolean('archive')->default(0)->comment('Актуальность');
|
||||
$table->timestamps();
|
||||
$table->comment('Временные промежутки для заказа такси');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('taxi_time_period');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::rename('taxi_time_period', 'taxi_time_periods');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('taxi_main', function (Blueprint $table){
|
||||
$table->string('taxi_time', 8)->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('taxi_main', function (Blueprint $table) {
|
||||
//$table->renameColumn('archive', 'cancel_rqst');
|
||||
$table->string('taxi_time', 6)->change();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('taxi_main', function (Blueprint $table) {
|
||||
$table->boolean('cancel_rqst')->default(0)->after('archive');
|
||||
$table->dropColumn('archive');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
// Schema::table('taxi_main', function(Blueprint $table) {
|
||||
// $table->renameColumn('taxi_address', 'order_addr_to');
|
||||
// });
|
||||
DB::statement('ALTER TABLE taxi_main CHANGE COLUMN taxi_address taxi_address_to Varchar(500)');
|
||||
// Schema::table('taxi_main', function (Blueprint $table) {
|
||||
// $table->renameColumn('taxi_address', 'taxi_address_to')->change();
|
||||
// //$table->string('taxi_time', 8)->change();
|
||||
// });
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
// Schema::table('taxi_main', function(Blueprint $table) {
|
||||
// $table->renameColumn('order_addr_to', 'taxi_address');
|
||||
// });
|
||||
DB::statement('ALTER TABLE taxi_main CHANGE COLUMN taxi_address_to taxi_address Varchar(500)');
|
||||
// Schema::table('taxi_main', function (Blueprint $table) {
|
||||
// //$table->renameColumn('archive', 'cancel_rqst');
|
||||
// $table->renameColumn('taxi_address_to', 'taxi_address')->change();
|
||||
// // $table->string('taxi_time', 6)->change();
|
||||
// });
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('taxi_main', function(Blueprint $table){
|
||||
$table->string('taxi_address_from', 500)->after('taxi_time')->comment('Адрес откуда ехать');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('taxi_main', function(Blueprint $table){
|
||||
$table->dropColumn('taxi_address_from');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('taxi_main', function(Blueprint $table){
|
||||
$table->string('taxi_address_from', 500)->nullable(false)->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('taxi_main', function(Blueprint $table){
|
||||
$table->string('taxi_address_from', 500)->nullable(true)->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('taxi_main', function(Blueprint $table){
|
||||
$table->string('taxi_address_to', 500)->nullable(false)->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('taxi_main', function(Blueprint $table){
|
||||
$table->string('taxi_address_to', 500)->nullable(true)->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('taxi_time_periods', function(Blueprint $table){
|
||||
$table->boolean('morning_time')->after('time_period')->nullable(false)->default(true)->comment('Утренний промежуток времени');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('taxi_time_periods', function(Blueprint $table){
|
||||
$table->dropColumn('morning_time');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
DB::statement('ALTER TABLE taxi_time_periods CHANGE COLUMN morning_time is_morning_time Boolean');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
DB::statement('ALTER TABLE taxi_time_periods CHANGE COLUMN is_morning_time morning_time Boolean');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('office_address', function(Blueprint $table){
|
||||
$table->id();
|
||||
$table->string('place', 20)->nullable(false)->comment('Площадка');
|
||||
$table->string('address', 100)->nullable(false)->comment('Адрес');
|
||||
$table->comment('Адреса офисов для подстановки в заказы такси');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::drop('office_address');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user