alembic.iniΒΆ

 1# Advanced Alchemy Alembic Asyncio Config
 2
 3[alembic]
 4prepend_sys_path = src:.
 5# path to migration scripts
 6script_location = migrations
 7
 8# template used to generate migration files
 9file_template = %%(year)d-%%(month).2d-%%(day).2d_%%(slug)s_%%(rev)s
10
11# This is not required to be set when running through `advanced_alchemy`
12# sqlalchemy.url = driver://user:pass@localhost/dbname
13
14# timezone to use when rendering the date
15# within the migration file as well as the filename.
16# string value is passed to dateutil.tz.gettz()
17# leave blank for localtime
18timezone = UTC
19
20# max length of characters to apply to the
21# "slug" field
22truncate_slug_length = 40
23
24# set to 'true' to run the environment during
25# the 'revision' command, regardless of autogenerate
26# revision_environment = false
27
28# set to 'true' to allow .pyc and .pyo files without
29# a source .py file to be detected as revisions in the
30# versions/ directory
31# sourceless = false
32
33# version location specification; this defaults
34# to alembic/versions.  When using multiple version
35# directories, initial revisions must be specified with --version-path
36# version_locations = %(here)s/bar %(here)s/bat alembic/versions
37
38# version path separator; As mentioned above, this is the character used to split
39# version_locations. The default within new alembic.ini files is "os", which uses os.pathsep.
40# If this key is omitted entirely, it falls back to the legacy behavior of splitting on spaces and/or commas.
41# Valid values for version_path_separator are:
42#
43# version_path_separator = :
44# version_path_separator = ;
45# version_path_separator = space
46version_path_separator = os  # Use os.pathsep. Default configuration used for new projects.
47
48# set to 'true' to search source files recursively
49# in each "version_locations" directory
50# new in Alembic version 1.10
51# recursive_version_locations = false
52
53# the output encoding used when revision files
54# are written from script.py.mako
55output_encoding = utf-8
56
57# [post_write_hooks]
58# This section defines scripts or Python functions that are run
59# on newly generated revision scripts.  See the documentation for further
60# detail and examples
61
62# format using "black" - use the console_scripts runner,
63# against the "black" entrypoint
64# hooks = black
65# black.type = console_scripts
66# black.entrypoint = black
67# black.options = -l 79 REVISION_SCRIPT_FILENAME
68
69# lint with attempts to fix using "ruff" - use the exec runner, execute a binary
70# hooks = ruff
71# ruff.type = exec
72# ruff.executable = %(here)s/.venv/bin/ruff
73# ruff.options = --fix REVISION_SCRIPT_FILENAME