mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-15 05:00:49 +08:00
feat: add notice lead time for global promotions
This commit is contained in:
@@ -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');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user