feat: add notice lead time for global promotions

This commit is contained in:
Qi HU
2025-12-11 12:19:35 +08:00
parent 60f1a4970c
commit 7719535940
6 changed files with 88 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('torrents_state', function (Blueprint $table) {
if (!Schema::hasColumn('torrents_state', 'notice_days')) {
$table->integer('notice_days')->default(0)->after('remark');
}
});
}
public function down(): void
{
Schema::table('torrents_state', function (Blueprint $table) {
if (Schema::hasColumn('torrents_state', 'notice_days')) {
$table->dropColumn('notice_days');
}
});
}
};