add station layer

This commit is contained in:
2025-12-22 09:53:02 +03:30
parent 7ba3d53155
commit 8abfd32be8
11 changed files with 118 additions and 32 deletions

View File

@@ -0,0 +1,31 @@
<?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('missions', function (Blueprint $table) {
$table->unsignedSmallInteger('station_id')->nullable();
$table->unsignedSmallInteger('city_id')->nullable();
$table->string('station_name')->nullable();
$table->string('city_name')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('missions', function (Blueprint $table) {
$table->dropColumn(['station_id', 'city_id', 'station_name', 'city_name']);
});
}
};

View File

@@ -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('users', function (Blueprint $table) {
$table->unsignedSmallInteger('station_id')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('station_id');
});
}
};