...
 
Commits (5)
xivo-dao (2019.05.00) xivo-callisto; urgency=medium
[ Tomas Taraba ]
* 2443 Route tables missing in dao init
[ Vojtech Sodoma ]
* 2428 Migrate outcalls to routes
-- Tomas Taraba <ttaraba@avencall.com> Mon, 15 Apr 2019 17:26:00 +0000
xivo-dao (2019.04.00) xivo-callisto; urgency=medium
* 2352 Add api to create func key destination for agent
......
......@@ -71,6 +71,7 @@ from xivo_dao.alchemy.ldapfilter import LdapFilter
from xivo_dao.alchemy.ldapserver import LdapServer
from xivo_dao.alchemy.linefeatures import LineFeatures
from xivo_dao.alchemy.mail import Mail
from xivo_dao.alchemy.mediaserver import MediaServer
from xivo_dao.alchemy.meetmefeatures import MeetmeFeatures
from xivo_dao.alchemy.monitoring import Monitoring
from xivo_dao.alchemy.musiconhold import MusicOnHold
......@@ -141,4 +142,8 @@ from xivo_dao.alchemy.voicemail import Voicemail
from xivo_dao.alchemy.xc_queue_members_default import XCQueueMembersDefault
from xivo_dao.alchemy.xc_queues import XCQueues
from xivo_dao.alchemy.xc_users import XCUsers
from xivo_dao.alchemy.mediaserver import MediaServer
\ No newline at end of file
from xivo_dao.alchemy.route import Route
from xivo_dao.alchemy.routecontext import RouteContext
from xivo_dao.alchemy.routemediaserver import RouteMediaServer
from xivo_dao.alchemy.routepattern import RoutePattern
from xivo_dao.alchemy.routetrunk import RouteTrunk
......@@ -28,8 +28,6 @@ class Route(Base):
)
id = Column(Integer, nullable=False)
pattern = Column(String, nullable=False)
regexp = Column(String, nullable=True)
subroutine = Column(String, nullable=True)
description = Column(Text)
priority = Column(Integer, nullable=False)
......@@ -24,7 +24,7 @@ from xivo_dao.helpers.db_manager import Base
class RouteContext(Base):
__tablename__ = 'routecontext'
__table_args__ = (
PrimaryKeyConstraint('id'),
PrimaryKeyConstraint('routeid', 'contextname'),
ForeignKeyConstraint(('routeid',),
('route.id',),
ondelete='RESTRICT'),
......
......@@ -24,7 +24,7 @@ from xivo_dao.helpers.db_manager import Base
class RouteMediaServer(Base):
__tablename__ = 'routemediaserver'
__table_args__ = (
PrimaryKeyConstraint('id'),
PrimaryKeyConstraint('routeid', 'mdsid'),
ForeignKeyConstraint(('routeid',),
('route.id',),
ondelete='RESTRICT'),
......
# -*- coding: utf-8 -*-
# Copyright (C) 2012-2014 Avencall
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>
from sqlalchemy.schema import Column, PrimaryKeyConstraint, ForeignKeyConstraint
from sqlalchemy.types import Integer, String
from xivo_dao.helpers.db_manager import Base
class RoutePattern(Base):
__tablename__ = 'routepattern'
__table_args__ = (
PrimaryKeyConstraint('id'),
ForeignKeyConstraint(('routeid',),
('route.id',),
ondelete='RESTRICT'),
)
id = Column(Integer)
pattern = Column(String, nullable=False)
regexp = Column(String, nullable=True)
target = Column(String, nullable=True)
callerid = Column(String(80), nullable=True)
routeid = Column(Integer, nullable=False)
......@@ -24,7 +24,7 @@ from xivo_dao.helpers.db_manager import Base
class RouteTrunk(Base):
__tablename__ = 'routetrunk'
__table_args__ = (
PrimaryKeyConstraint('id'),
PrimaryKeyConstraint('routeid', 'trunkid'),
ForeignKeyConstraint(('routeid',),
('route.id',),
ondelete='RESTRICT'),
......