Asterisk - The Open Source Telephony Project GIT-master-70eff7f
Loading...
Searching...
No Matches
8e6a9c2f4b17_increase_queue_log_time_precision.py
Go to the documentation of this file.
1"""increase queue_log time precision
2
3Revision ID: 8e6a9c2f4b17
4Revises: 4105ee839f58
5Create Date: 2026-08-03 00:00:00.000000
6
7"""
8
9# revision identifiers, used by Alembic.
10revision = "8e6a9c2f4b17"
11down_revision = "4105ee839f58"
12
13from alembic import op
14import sqlalchemy as sa
15from sqlalchemy.dialects.mysql import DATETIME as MYSQL_DATETIME
16
17
18def upgrade():
19 # MariaDB is reported as the 'mysql' dialect, so this covers both.
20 if op.get_context().bind.dialect.name == "mysql":
21 op.alter_column(
22 "queue_log",
23 "time",
24 existing_type=sa.DateTime(),
25 type_=MYSQL_DATETIME(fsp=6),
26 existing_nullable=True,
27 )
28
29
31 if op.get_context().bind.dialect.name == "mysql":
32 op.alter_column(
33 "queue_log",
34 "time",
35 existing_type=MYSQL_DATETIME(fsp=6),
36 type_=sa.DateTime(),
37 existing_nullable=True,
38 )