comparison sat/memory/migration/alembic.ini @ 3582:71516731d0aa

core (memory/sqla): database migration using Alembic: Alembic database migration tool, which is the recommended one for SQLAlchemy has been integrated. When a database is created, it will be used to stamp to current (head) revision, otherwise, DB will be checked to see if it needs to be updated, and upgrade will be triggered if necessary.
author Goffi <goffi@goffi.org>
date Fri, 25 Jun 2021 17:55:23 +0200
parents
children
comparison
equal deleted inserted replaced
3581:84ea57a8d6b3 3582:71516731d0aa
1 # A generic, single database configuration.
2
3 [alembic]
4 # path to migration scripts
5 script_location = %(here)s
6
7 # template used to generate migration files
8 # file_template = %%(rev)s_%%(slug)s
9
10 # sys.path path, will be prepended to sys.path if present.
11 # defaults to the current working directory.
12 # prepend_sys_path = .
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
18 # timezone =
19
20 # max length of characters to apply to the
21 # "slug" field
22 # truncate_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 migration/versions. When using multiple version
35 # directories, initial revisions must be specified with --version-path
36 # version_locations = %(here)s/bar %(here)s/bat migration/versions
37
38 # the output encoding used when revision files
39 # are written from script.py.mako
40 # output_encoding = utf-8
41
42 # sqlalchemy.url = driver://user:pass@localhost/dbname
43
44
45 [post_write_hooks]
46 # post_write_hooks defines scripts or Python functions that are run
47 # on newly generated revision scripts. See the documentation for further
48 # detail and examples
49
50 # format using "black" - use the console_scripts runner, against the "black" entrypoint
51 # hooks = black
52 # black.type = console_scripts
53 # black.entrypoint = black
54 # black.options = -l 79 REVISION_SCRIPT_FILENAME
55
56 # Logging configuration
57 [loggers]
58 keys = root,sqlalchemy,alembic
59
60 [handlers]
61 keys = console
62
63 [formatters]
64 keys = generic
65
66 [logger_root]
67 level = WARN
68 handlers = console
69 qualname =
70
71 [logger_sqlalchemy]
72 level = WARN
73 handlers =
74 qualname = sqlalchemy.engine
75
76 [logger_alembic]
77 level = INFO
78 handlers =
79 qualname = alembic
80
81 [handler_console]
82 class = StreamHandler
83 args = (sys.stderr,)
84 level = NOTSET
85 formatter = generic
86
87 [formatter_generic]
88 format = %(levelname)-5.5s [%(name)s] %(message)s
89 datefmt = %H:%M:%S