add rahdar id to road item project

This commit is contained in:
2024-12-15 10:08:49 +03:30
parent e7163490c9
commit 1b60739a14
12 changed files with 477 additions and 30 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('road_items_projects', function (Blueprint $table) {
$table->foreignId('rahdar_id')->nullable()->constrained('rahdaran');
$table->string('rahdar_code')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('road_items_projects', function (Blueprint $table) {
$table->dropForeign(['rahdar_id']);
$table->dropColumn('rahdar_id');
$table->dropColumn('rahdar_code');
});
}
};