fix: 恢复 V1 原样,site_type 改动迁移到 V5
- V1: 恢复到原始 DEFAULT 'private' + 原始注释 - V5: ALTER TABLE sites MODIFY site_type DEFAULT 'unknown' - 彻底解决 Flyway checksum 冲突,不改 flyway_schema_history
This commit is contained in:
@@ -31,7 +31,6 @@ spring:
|
|||||||
locations: classpath:db/migration
|
locations: classpath:db/migration
|
||||||
baseline-on-migrate: true
|
baseline-on-migrate: true
|
||||||
baseline-version: 0
|
baseline-version: 0
|
||||||
validate-on-migrate: false
|
|
||||||
|
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
configuration:
|
configuration:
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ CREATE TABLE sites (
|
|||||||
description TEXT COMMENT '站点描述',
|
description TEXT COMMENT '站点描述',
|
||||||
base_url VARCHAR(500) COMMENT '站点基础URL',
|
base_url VARCHAR(500) COMMENT '站点基础URL',
|
||||||
icon_url VARCHAR(500) COMMENT '站点图标URL',
|
icon_url VARCHAR(500) COMMENT '站点图标URL',
|
||||||
site_type VARCHAR(50) NOT NULL DEFAULT 'unknown' COMMENT '站点引擎类型: nexusphp/mtorrent/mteam/...',
|
site_type VARCHAR(50) NOT NULL DEFAULT 'private' COMMENT '站点类型: private/public/xxx',
|
||||||
schema_version VARCHAR(20) NOT NULL DEFAULT '1.0.0' COMMENT '当前生效的schema版本',
|
schema_version VARCHAR(20) NOT NULL DEFAULT '1.0.0' COMMENT '当前生效的schema版本',
|
||||||
current_config_id BIGINT UNSIGNED COMMENT '当前生效的配置版本ID(site_configs.id)',
|
current_config_id BIGINT UNSIGNED COMMENT '当前生效的配置版本ID(site_configs.id)',
|
||||||
status VARCHAR(20) NOT NULL DEFAULT 'active' COMMENT '站点状态: active/pending/deprecated',
|
status VARCHAR(20) NOT NULL DEFAULT 'active' COMMENT '站点状态: active/pending/deprecated',
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
-- PAR Flyway V5: 站点类型字段修正(从 V1 回退中提取)
|
||||||
|
-- 统一 site_type 默认值和注释,与 SiteType 枚举对齐
|
||||||
|
ALTER TABLE sites
|
||||||
|
MODIFY COLUMN site_type VARCHAR(50) NOT NULL DEFAULT 'unknown' COMMENT '站点引擎类型: nexusphp/mtorrent/mteam/...';
|
||||||
Reference in New Issue
Block a user