This commit is contained in:
@@ -9,6 +9,10 @@ import os
|
||||
# this is the Alembic Config object, which provides
|
||||
# access to the values within the .ini file in use.
|
||||
config = context.config
|
||||
import os
|
||||
db_url = os.getenv("DATABASE_URL", "sqlite+aiosqlite:///db/bot.db")
|
||||
db_url_sync = db_url.replace("sqlite+aiosqlite", "sqlite") # Alembic нужен sync-драйвер
|
||||
config.set_main_option("sqlalchemy.url", db_url_sync)
|
||||
|
||||
# Interpret the config file for Python logging.
|
||||
# This line sets up loggers basically.
|
||||
|
||||
Reference in New Issue
Block a user