修复迁移幂等并补部署检查
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def test_is_locked_migration_is_idempotent():
|
||||
source = Path("alembic/versions/20260116_01_add_is_locked_to_studies.py").read_text(encoding="utf-8")
|
||||
|
||||
assert 'if "is_locked" not in columns:' in source
|
||||
assert 'if "is_locked" in columns:' in source
|
||||
|
||||
|
||||
def test_migration_state_check_script_exists():
|
||||
source = Path("scripts/check_migration_state.py").read_text(encoding="utf-8")
|
||||
|
||||
assert "missing alembic_version table" in source
|
||||
assert "studies" in source
|
||||
assert "subjects" in source
|
||||
assert "monitoring_visit_issues" in source
|
||||
Reference in New Issue
Block a user