Database migrations
This commit is contained in:
47
alembic.ini
Normal file
47
alembic.ini
Normal file
@@ -0,0 +1,47 @@
|
||||
# Dev-only config for the alembic CLI (the app runs migrations itself at
|
||||
# startup via pirats.database.run_migrations).
|
||||
#
|
||||
# New migration: .venv/bin/alembic revision --autogenerate -m "add foo column"
|
||||
# Apply: .venv/bin/alembic upgrade head
|
||||
#
|
||||
# No sqlalchemy.url here: env.py uses the app's engine (DATABASE_URL or
|
||||
# ./rats_with_gats.db). Override with: alembic -x url=sqlite:///other.db ...
|
||||
|
||||
[alembic]
|
||||
script_location = src/pirats/migrations
|
||||
file_template = %%(rev)s_%%(slug)s
|
||||
prepend_sys_path = src
|
||||
|
||||
[loggers]
|
||||
keys = root,sqlalchemy,alembic
|
||||
|
||||
[handlers]
|
||||
keys = console
|
||||
|
||||
[formatters]
|
||||
keys = generic
|
||||
|
||||
[logger_root]
|
||||
level = WARNING
|
||||
handlers = console
|
||||
qualname =
|
||||
|
||||
[logger_sqlalchemy]
|
||||
level = WARNING
|
||||
handlers =
|
||||
qualname = sqlalchemy.engine
|
||||
|
||||
[logger_alembic]
|
||||
level = INFO
|
||||
handlers =
|
||||
qualname = alembic
|
||||
|
||||
[handler_console]
|
||||
class = StreamHandler
|
||||
args = (sys.stderr,)
|
||||
level = NOTSET
|
||||
formatter = generic
|
||||
|
||||
[formatter_generic]
|
||||
format = %(levelname)-5.5s [%(name)s] %(message)s
|
||||
datefmt = %H:%M:%S
|
||||
Reference in New Issue
Block a user