fuc-new/db/migrations/2023082000-remove_user_expire_in.php
hellcat 1fe8673f62 1
2025-10-01 13:34:29 +08:00

27 lines
581 B
PHP
Executable File

<?php
declare(strict_types=1);
use App\Interfaces\MigrationInterface;
use App\Services\DB;
return new class() implements MigrationInterface {
public function up(): int
{
DB::getPdo()->exec('
ALTER TABLE user DROP COLUMN IF EXISTS `expire_in`;
');
return 2023082000;
}
public function down(): int
{
DB::getPdo()->exec("
ALTER TABLE user ADD COLUMN IF NOT EXISTS `expire_in` datetime NOT NULL DEFAULT '2199-01-01 00:00:00' COMMENT '账户过期时间';
");
return 2023081800;
}
};