Skip to content

Commit

Permalink
call_filter: add UUID column
Browse files Browse the repository at this point in the history
  • Loading branch information
bloom1 committed Jul 25, 2023
1 parent b17bcbc commit e9cfd9d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xivo_dao/alchemy/callfilter.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright 2013-2023 The Wazo Authors (see the AUTHORS file)
# SPDX-License-Identifier: GPL-3.0-or-later

from sqlalchemy import text
from sqlalchemy.dialects.postgresql import UUID
from sqlalchemy.ext.associationproxy import association_proxy
from sqlalchemy.ext.orderinglist import ordering_list
from sqlalchemy.ext.hybrid import hybrid_property
Expand All @@ -23,10 +25,12 @@ class Callfilter(Base):
__table_args__ = (
PrimaryKeyConstraint('id'),
UniqueConstraint('name'),
UniqueConstraint('uuid'),
Index('callfilter__idx__tenant_uuid', 'tenant_uuid'),
)

id = Column(Integer, nullable=False)
uuid = Column(UUID(as_uuid=True), server_default=text('uuid_generate_v4()'))
tenant_uuid = Column(
String(36),
ForeignKey('tenant.uuid', ondelete='CASCADE'),
Expand Down

0 comments on commit e9cfd9d

Please sign in to comment.