add columns to cartable

This commit is contained in:
2025-09-29 11:44:42 +03:30
parent 38c24daa17
commit aa898576eb
6 changed files with 11 additions and 6 deletions

View File

@@ -12,10 +12,10 @@ return new class extends Migration
public function up(): void
{
Schema::table('rahdaran', function (Blueprint $table) {
$table->unsignedTinyInteger('province_id');
$table->unsignedTinyInteger('province_id')->nullable();
$table->foreign('province_id')->references('id')->on('provinces');
$table->string('province_name');
$table->unsignedBigInteger('edareh_shahri_id');
$table->string('province_name')->nullable();
$table->unsignedBigInteger('edareh_shahri_id')->nullable();
$table->foreign('edareh_shahri_id')->references('id')->on('edarate_shahri');
$table->boolean('is_driver')->default(false);
});
@@ -29,7 +29,7 @@ return new class extends Migration
Schema::table('rahdaran', function (Blueprint $table) {
$table->dropForeign('province_id');
$table->dropForeign('edareh_shahri_id');
$table->dropColumn(['province_id', 'province_name']);
$table->dropColumn(['province_id', 'province_name', 'edareh_shahri_id', 'is_driver']);
});
}
};