mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-08-14 18:24:42 +08:00
chore(database): align v3 migration filenames
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"""3.0.2
|
||||
"""3.0.3
|
||||
整理历史按源存储与源路径唯一
|
||||
|
||||
Revision ID: 7f5c1d2e3a4b
|
||||
@@ -1,4 +1,4 @@
|
||||
"""3.0.0
|
||||
"""3.0.2
|
||||
统一通用媒体表的来源与原生 ID
|
||||
|
||||
Revision ID: 8a4c7e1d2f90
|
||||
@@ -1,4 +1,4 @@
|
||||
"""3.0.0
|
||||
"""3.0.5
|
||||
允许插件扩展媒体来源
|
||||
|
||||
Revision ID: b3d7e9f1a2c4
|
||||
@@ -1,4 +1,4 @@
|
||||
"""3.0.3
|
||||
"""3.0.4
|
||||
新增待整理文件登记表
|
||||
|
||||
整理队列是纯内存的 queue.Queue,进程重启会让队列里的任务连同「这些文件还没
|
||||
@@ -35,7 +35,7 @@ def _create_fixed_constraint_table(connection: sa.Connection) -> None:
|
||||
def test_upgrade_replaces_fixed_source_whitelist(monkeypatch) -> None:
|
||||
"""升级后应保留原数据、允许插件来源并继续拒绝非法身份。"""
|
||||
migration = importlib.import_module(
|
||||
"database.versions.b3d7e9f1a2c4_3_0_0"
|
||||
"database.versions.b3d7e9f1a2c4_3_0_5"
|
||||
)
|
||||
engine = sa.create_engine("sqlite://")
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ def test_cleanup_migration_keeps_one_complete_identity_and_drops_legacy_columns(
|
||||
) -> None:
|
||||
"""升级应修复半对身份、保留完整身份并删除六表全部专用列。"""
|
||||
migration = importlib.import_module(
|
||||
"database.versions.8a4c7e1d2f90_3_0_0"
|
||||
"database.versions.8a4c7e1d2f90_3_0_2"
|
||||
)
|
||||
engine = sa.create_engine("sqlite://")
|
||||
|
||||
@@ -254,7 +254,7 @@ def test_cleanup_migration_keeps_one_complete_identity_and_drops_legacy_columns(
|
||||
def test_cleanup_migration_backfills_every_supported_mediaid_prefix(monkeypatch) -> None:
|
||||
"""升级应从历史组合字段回填全部规范来源及仍受支持的别名。"""
|
||||
migration = importlib.import_module(
|
||||
"database.versions.8a4c7e1d2f90_3_0_0"
|
||||
"database.versions.8a4c7e1d2f90_3_0_2"
|
||||
)
|
||||
engine = sa.create_engine("sqlite://")
|
||||
|
||||
@@ -302,7 +302,7 @@ def test_cleanup_migration_backfills_every_supported_mediaid_prefix(monkeypatch)
|
||||
def test_cleanup_migration_rejects_invalid_database_identity_pairs(monkeypatch) -> None:
|
||||
"""升级后的数据库应允许插件来源,并拒绝半对、非法来源和零值身份。"""
|
||||
migration = importlib.import_module(
|
||||
"database.versions.8a4c7e1d2f90_3_0_0"
|
||||
"database.versions.8a4c7e1d2f90_3_0_2"
|
||||
)
|
||||
engine = sa.create_engine("sqlite://")
|
||||
|
||||
@@ -345,7 +345,7 @@ def test_cleanup_migration_rejects_invalid_database_identity_pairs(monkeypatch)
|
||||
def test_cleanup_migration_downgrade_restores_legacy_schema(monkeypatch) -> None:
|
||||
"""降级应恢复旧列并移除仅由本次迁移引入的媒体库身份列。"""
|
||||
migration = importlib.import_module(
|
||||
"database.versions.8a4c7e1d2f90_3_0_0"
|
||||
"database.versions.8a4c7e1d2f90_3_0_2"
|
||||
)
|
||||
engine = sa.create_engine("sqlite://")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user