# Alembic configuration for {{ project_name }}

[alembic]
# Path to migration scripts
script_location = db/migrations

# Template used to generate migration file names
file_template = %%(year)d_%%(month).2d_%%(day).2d_%%(hour).2d%%(minute).2d-%%(rev)s_%%(slug)s

# Set to 'true' to run the environment during
# the 'revision' command, regardless of autogenerate
# revision_environment = false

# Set to 'true' to allow .pyc and .pyo files without
# having to regenerate (delete files from versions/)
# sourceless = false

# Version number format
# version_num_format = %%(version)s

# Max length of characters to apply to the "slug" field
truncate_slug_length = 40

# Set to true to search source files recursively
# in each "version_locations" directory
# recursive_version_locations = false

# The output encoding used when writing migration scripts
output_encoding = utf-8

# Database URL - this is overridden by env.py from settings
sqlalchemy.url = sqlite+aiosqlite:///./{{ project_name_snake }}.db


# Logging configuration
[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
