gitscope
← marzneshin / v0.7.2 / alembic.ini
https://dev.kronoz.win/r/marzneshin.git
alembic.ini · INI
Blame Raw
 1# A generic, single database configuration.
 2
 3[alembic]
 4# path to migration scripts
 5script_location = app/db/migrations
 6
 7# template used to generate migration file names; The default value is %%(rev)s_%%(slug)s
 8# Uncomment the line below if you want the files to be prepended with date and time
 9# see https://alembic.sqlalchemy.org/en/latest/tutorial.html#editing-the-ini-file
10# for all available tokens
11file_template = %%(year)d%%(month).2d%%(day).2d_%%(rev)s_%%(slug)s
12# sys.path path, will be prepended to sys.path if present.
13# defaults to the current working directory.
14prepend_sys_path = .
15
16# timezone to use when rendering the date within the migration file
17# as well as the filename.
18# If specified, requires the python-dateutil library that can be
19# installed by adding `alembic[tz]` to the pip requirements
20# string value is passed to dateutil.tz.gettz()
21# leave blank for localtime
22# timezone =
23
24# max length of characters to apply to the
25# "slug" field
26# truncate_slug_length = 40
27
28# set to 'true' to run the environment during
29# the 'revision' command, regardless of autogenerate
30# revision_environment = false
31
32# set to 'true' to allow .pyc and .pyo files without
33# a source .py file to be detected as revisions in the
34# versions/ directory
35# sourceless = false
36
37# version location specification; This defaults
38# to app/db/migrations/versions.  When using multiple version
39# directories, initial revisions must be specified with --version-path.
40# The path separator used here should be the separator specified by "version_path_separator" below.
41# version_locations = %(here)s/bar:%(here)s/bat:app/db/migrations/versions
42
43# version path separator; As mentioned above, this is the character used to split
44# version_locations. The default within new alembic.ini files is "os", which uses os.pathsep.
45# If this key is omitted entirely, it falls back to the legacy behavior of splitting on spaces and/or commas.
46# Valid values for version_path_separator are:
47#
48# version_path_separator = :
49# version_path_separator = ;
50# version_path_separator = space
51version_path_separator = os  # Use os.pathsep. Default configuration used for new projects.
52
53
54[post_write_hooks]
55# post_write_hooks defines scripts or Python functions that are run
56# on newly generated revision scripts.  See the documentation for further
57# detail and examples
58
59# format using "black" - use the console_scripts runner, against the "black" entrypoint
60# hooks = black
61# black.type = console_scripts
62# black.entrypoint = black
63# black.options = -l 79 REVISION_SCRIPT_FILENAME
64
65# Logging configuration
66[loggers]
67keys = root,sqlalchemy,alembic
68
69[handlers]
70keys = console
71
72[formatters]
73keys = generic
74
75[logger_root]
76level = WARN
77handlers = console
78qualname =
79
80[logger_sqlalchemy]
81level = WARN
82handlers =
83qualname = sqlalchemy.engine
84
85[logger_alembic]
86level = INFO
87handlers =
88qualname = alembic
89
90[handler_console]
91class = StreamHandler
92args = (sys.stderr,)
93level = NOTSET
94formatter = generic
95
96[formatter_generic]
97format = %(levelname)-5.5s [%(name)s] %(message)s
98datefmt = %H:%M:%S