crate new project

This commit is contained in:
2025-11-19 09:25:17 +03:30
parent d441ebd0b4
commit 5672c6eb0d
11 changed files with 161 additions and 45 deletions

View File

@@ -0,0 +1,35 @@
<?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('cmms_machines', function (Blueprint $table) {
$table->foreignId('province_id')->nullable()->constrained('provinces');
$table->foreignId('city_id')->nullable()->constrained('cities');
$table->foreignId('station_id')->nullable()->constrained('rahdari_points');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('cmms_machines', function (Blueprint $table) {
$table->dropForeign('cmms_machines_province_id_foreign');
$table->dropForeign('cmms_machines_city_id_foreign');
$table->dropForeign('cmms_machines_station_id_foreign');
$table->dropColumn('province_id');
$table->dropColumn('city_id');
$table->dropColumn('station_id');
});
}
};