driver cartable
This commit is contained in:
@@ -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('rahdaran', function (Blueprint $table) {
|
||||
$table->unsignedTinyInteger('province_id');
|
||||
$table->foreign('province_id')->references('id')->on('provinces');
|
||||
$table->string('province_name');
|
||||
$table->unsignedBigInteger('edareh_shahri_id');
|
||||
$table->foreign('edareh_shahri_id')->references('id')->on('edarate_shahri');
|
||||
$table->boolean('is_driver')->default(false);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('rahdaran', function (Blueprint $table) {
|
||||
$table->dropForeign('province_id');
|
||||
$table->dropForeign('edareh_shahri_id');
|
||||
$table->dropColumn(['province_id', 'province_name']);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -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('missions', function (Blueprint $table) {
|
||||
$table->string('km')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('missions', function (Blueprint $table) {
|
||||
$table->dropColumn('km');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user