mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 06:23:34 -07:00
Fix alembic database url
This commit is contained in:
parent
3022cc20ec
commit
622e4575eb
3 changed files with 4 additions and 2 deletions
|
@ -39,7 +39,7 @@ prepend_sys_path = .
|
|||
# are written from script.py.mako
|
||||
# output_encoding = utf-8
|
||||
|
||||
sqlalchemy.url = sqlite:///mealie.db
|
||||
sqlalchemy.url = %(DB_URL)s
|
||||
|
||||
|
||||
[post_write_hooks]
|
||||
|
|
|
@ -25,6 +25,7 @@ target_metadata = Base.metadata
|
|||
# can be acquired:
|
||||
# my_important_option = config.get_main_option("my_important_option")
|
||||
# ... etc.
|
||||
from mealie.core.config import settings
|
||||
|
||||
|
||||
def run_migrations_offline():
|
||||
|
@ -39,7 +40,7 @@ def run_migrations_offline():
|
|||
script output.
|
||||
|
||||
"""
|
||||
url = config.get_main_option("sqlalchemy.url")
|
||||
url = settings.DB_URL
|
||||
context.configure(
|
||||
url=url,
|
||||
target_metadata=target_metadata,
|
||||
|
@ -58,6 +59,7 @@ def run_migrations_online():
|
|||
and associate a connection with the context.
|
||||
|
||||
"""
|
||||
config.set_section_option(config.config_ini_section, "DB_URL", settings.DB_URL)
|
||||
connectable = engine_from_config(
|
||||
config.get_section(config.config_ini_section),
|
||||
prefix="sqlalchemy.",
|
||||
|
|
BIN
mealie/mealie.db
BIN
mealie/mealie.db
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue