-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathalembic.ini
More file actions
85 lines (62 loc) · 1.97 KB
/
alembic.ini
File metadata and controls
85 lines (62 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# A generic Alembic configuration file.
[alembic]
# path to migration scripts
script_location = alembic
# template for migration file names, example: "%%(rev)s_%%(slug)s.py"
# Include date/time as a prefix but keep the revision ID as the primary identifier
file_template = %%(year)d_%%(month).2d_%%(day).2d_%%(rev)s_%%(slug)s
# sys.path entries, comma separated
# prepend_sys_path = .
# timezone for migration file naming
timezone = UTC
# Logging configuration for Alembic
# Formatted exactly like the standard Python logging module configuration.
[loggers]
keys = root,alembic,sqlalchemy
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = INFO
handlers = console
qualname =
[logger_alembic]
level = INFO
handlers = console
qualname = alembic
[logger_sqlalchemy]
level = WARN
handlers =
qualname = sqlalchemy.engine
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %Y-%m-%d %H:%M:%S
# --- Database Configuration ---
# The SQLAlchemy URL can be overridden by the ALCHEMY_DATABASE_URL environment variable
# or the --sqlalchemy-url command line option.
sqlalchemy.url = ${ALCHEMY_DATABASE_URL}
# Other Alembic settings...
# Set to True if you want Alembic to output SQL to stdout
# output_encoding = utf-8
# Set to True to allow Alembic to generate revision identifiers based on date
# rather than incremental numbers.
# revision_environment = false
# Set to True to indicate that the structure is multi-database.
# Set to a comma-separated list of database names to reference names
# within the migration script.
# databases =
# --- Async Configuration ---
# Set main options for async support
[alembic:async]
# This should match the driver used in your application
driver = asyncpg
# Set target metadata for autogenerate
# Import Base from your models
target_metadata = src.db.models.Base.metadata
# Other migration options...