Repository navigation
Expand file tree
/
Copy pathalembic.ini
More file actions
66 lines (50 loc) · 1.53 KB
/
Copy pathalembic.ini
File metadata and controls
66 lines (50 loc) · 1.53 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
# Alembic configuration for Mentora
# Documentation: https://alembic.sqlalchemy.org/en/latest/tutorial.html
[alembic]
# Path to migration environment
script_location = ai_service/migrations
# Template for migration file names (UTC timestamp + slug)
file_template = %%(year)d%%(month).2d%%(day).2d_%%(hour).2d%%(minute).2d_%%(slug)s
# Timezone for timestamp — use UTC for consistency
timezone = UTC
# Maximum length of characters to apply to slugify the revision message
truncate_slug_length = 40
# Output encoding used by revision files
output_encoding = utf-8
# Database URL — overridden by env.py from environment variable DATABASE_URL
sqlalchemy.url = postgresql+asyncpg://postgres:mentoradev@localhost:5432/mentora
[post_write_hooks]
# Auto-format Python migration files with ruff after creation
hooks = ruff_format ruff_check
ruff_format.type = console_scripts
ruff_format.entrypoint = ruff
ruff_format.options = format REVISION_SCRIPT_FILENAME
ruff_check.type = console_scripts
ruff_check.entrypoint = ruff
ruff_check.options = check --fix REVISION_SCRIPT_FILENAME
[loggers]
keys = root,sqlalchemy,alembic
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = WARNING
handlers = console
qualname =
[logger_sqlalchemy]
level = WARNING
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