diff options
| author | 2024-07-09 19:44:24 +0100 | |
|---|---|---|
| committer | 2024-07-21 13:45:30 +0100 | |
| commit | 6de1e262a478973ff3cec0ca896682c3ecdde090 (patch) | |
| tree | 18416e44e05f4314f5ffaa2b7fc3dbc0b77c8ed5 /alembic.ini | |
| parent | Move existing models to schemas namespace (diff) | |
Add alembic boiler plate for migrations
Diffstat (limited to 'alembic.ini')
| -rw-r--r-- | alembic.ini | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/alembic.ini b/alembic.ini new file mode 100644 index 0000000..89c7735 --- /dev/null +++ b/alembic.ini @@ -0,0 +1,53 @@ +# A generic, single database configuration. + +[alembic] +script_location = migrations +file_template = %%(epoch)s-%%(rev)s_%%(slug)s +prepend_sys_path = . +timezone = utc +version_path_separator = os +output_encoding = utf-8 + +[post_write_hooks] +hooks = ruff-lint, ruff-format +ruff-lint.type = exec +ruff-lint.executable = ruff +ruff-lint.options = check --fix-only REVISION_SCRIPT_FILENAME + +ruff-format.type = exec +ruff-format.executable = ruff +ruff-format.options = format REVISION_SCRIPT_FILENAME + +[loggers] +keys = root,sqlalchemy,alembic + +[handlers] +keys = console + +[formatters] +keys = generic + +[logger_root] +level = WARN +handlers = console +qualname = + +[logger_sqlalchemy] +level = WARN +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 |