Asterisk - The Open Source Telephony Project
GIT-master-f36a736
contrib
ast-db-manage
voicemail
versions
a2e9769475e_create_tables.py
Go to the documentation of this file.
1
#
2
# Asterisk -- An open source telephony toolkit.
3
#
4
# Copyright (C) 2013, Russell Bryant
5
#
6
# Russell Bryant <russell@russellbryant.net>
7
#
8
# See http://www.asterisk.org for more information about
9
# the Asterisk project. Please do not directly contact
10
# any of the maintainers of this project for assistance;
11
# the project provides a web site, mailing lists and IRC
12
# channels for your use.
13
#
14
# This program is free software, distributed under the terms of
15
# the GNU General Public License Version 2. See the LICENSE file
16
# at the top of the source tree.
17
#
18
19
"""Create tables
20
21
Revision ID: a2e9769475e
22
Revises: None
23
Create Date: 2013-07-29 23:43:09.431668
24
25
"""
26
27
# revision identifiers, used by Alembic.
28
revision =
'a2e9769475e'
29
down_revision =
None
30
31
from
alembic
import
op
32
import
sqlalchemy
as
sa
33
34
35
def
upgrade
():
36
op.create_table(
37
'voicemail_messages'
,
38
sa.Column(
'dir'
, sa.String(255), nullable=
False
),
39
sa.Column(
'msgnum'
, sa.Integer, nullable=
False
),
40
sa.Column(
'context'
, sa.String(80)),
41
sa.Column(
'macrocontext'
, sa.String(80)),
42
sa.Column(
'callerid'
, sa.String(80)),
43
sa.Column(
'origtime'
, sa.Integer),
44
sa.Column(
'duration'
, sa.Integer),
45
sa.Column(
'recording'
, sa.LargeBinary),
46
sa.Column(
'flag'
, sa.String(30)),
47
sa.Column(
'category'
, sa.String(30)),
48
sa.Column(
'mailboxuser'
, sa.String(30)),
49
sa.Column(
'mailboxcontext'
, sa.String(30)),
50
sa.Column(
'msg_id'
, sa.String(40))
51
)
52
op.create_primary_key(
'voicemail_messages_dir_msgnum'
,
53
'voicemail_messages'
, [
'dir'
,
'msgnum'
])
54
op.create_index(
'voicemail_messages_dir'
,
'voicemail_messages'
, [
'dir'
])
55
56
57
def
downgrade
():
58
op.drop_table(
'voicemail_messages'
)
a2e9769475e_create_tables.upgrade
def upgrade()
Definition:
a2e9769475e_create_tables.py:35
a2e9769475e_create_tables.downgrade
def downgrade()
Definition:
a2e9769475e_create_tables.py:57
Generated on Wed Dec 18 2024 20:04:15 for Asterisk - The Open Source Telephony Project by
1.9.4