This commit is contained in:
2026-07-12 12:00:29 +03:30
parent d450bd216c
commit 7095a7a102
5 changed files with 34 additions and 10 deletions
@@ -21,7 +21,7 @@ return new class extends Migration
$payload = [
'title_fa' => self::TITLE_FA,
'description' => self::DESCRIPTION,
'can_edit' => 1,
'can_edit' => 0,
'updated_at' => now(),
];
@@ -0,0 +1,24 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
if (!Schema::hasTable('settings') || !Schema::hasColumn('settings', 'can_edit')) {
return;
}
DB::table('settings')
->where('key', 'fee_deduct_from_gold')
->update(['can_edit' => 0, 'updated_at' => now()]);
}
public function down(): void
{
// can_edit را عمداً برنمی‌گردانیم — قفل بودن فیلد سیاست ثابت است.
}
};