Asterisk - The Open Source Telephony Project
GIT-master-70eff7f
Loading...
Searching...
No Matches
contrib
ast-db-manage
queue_log
versions
8e6a9c2f4b17_increase_queue_log_time_precision.py
Go to the documentation of this file.
1
"""increase queue_log time precision
2
3
Revision ID: 8e6a9c2f4b17
4
Revises: 4105ee839f58
5
Create Date: 2026-08-03 00:00:00.000000
6
7
"""
8
9
# revision identifiers, used by Alembic.
10
revision =
"8e6a9c2f4b17"
11
down_revision =
"4105ee839f58"
12
13
from
alembic
import
op
14
import
sqlalchemy
as
sa
15
from
sqlalchemy.dialects.mysql
import
DATETIME
as
MYSQL_DATETIME
16
17
18
def
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
30
def
downgrade
():
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
)
8e6a9c2f4b17_increase_queue_log_time_precision.upgrade
upgrade()
Definition
8e6a9c2f4b17_increase_queue_log_time_precision.py:18
8e6a9c2f4b17_increase_queue_log_time_precision.downgrade
downgrade()
Definition
8e6a9c2f4b17_increase_queue_log_time_precision.py:30
Generated on Mon Aug 31 2026 12:08:59 for Asterisk - The Open Source Telephony Project by
1.9.8