mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-06-01 13:40:54 +08:00
fix(alembic): ConfigParser interpolation breaks migration with special chars in PG password (#5782)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from configparser import ConfigParser as _ConfigParser
|
||||
|
||||
from alembic.command import upgrade
|
||||
from alembic.config import Config
|
||||
|
||||
@@ -24,6 +26,7 @@ def update_db():
|
||||
script_location = settings.ROOT_PATH / 'database'
|
||||
try:
|
||||
alembic_cfg = Config()
|
||||
alembic_cfg.file_config = _ConfigParser(interpolation=None)
|
||||
alembic_cfg.set_main_option('script_location', str(script_location))
|
||||
|
||||
# 根据数据库类型设置不同的URL
|
||||
|
||||
Reference in New Issue
Block a user