Remove useless {} from __table_args__
There's no need to have {} on __table_args__. Change-Id: Ic094b6a40c3525d393203cf3dab2f6fc5ffa92c7
This commit is contained in:
parent
37999ec7f8
commit
c807d1734a
|
@ -77,4 +77,4 @@ class RoleTable(sql.ModelBase, sql.DictBase):
|
||||||
id = sql.Column(sql.String(64), primary_key=True)
|
id = sql.Column(sql.String(64), primary_key=True)
|
||||||
name = sql.Column(sql.String(255), unique=True, nullable=False)
|
name = sql.Column(sql.String(255), unique=True, nullable=False)
|
||||||
extra = sql.Column(sql.JsonBlob())
|
extra = sql.Column(sql.JsonBlob())
|
||||||
__table_args__ = (sql.UniqueConstraint('name'), {})
|
__table_args__ = (sql.UniqueConstraint('name'),)
|
||||||
|
|
|
@ -195,4 +195,4 @@ class RoleTable(sql.ModelBase, sql.DictBase):
|
||||||
domain_id = sql.Column(sql.String(64), nullable=False,
|
domain_id = sql.Column(sql.String(64), nullable=False,
|
||||||
server_default=NULL_DOMAIN_ID)
|
server_default=NULL_DOMAIN_ID)
|
||||||
extra = sql.Column(sql.JsonBlob())
|
extra = sql.Column(sql.JsonBlob())
|
||||||
__table_args__ = (sql.UniqueConstraint('name', 'domain_id'), {})
|
__table_args__ = (sql.UniqueConstraint('name', 'domain_id'),)
|
||||||
|
|
|
@ -588,4 +588,4 @@ class ProjectEndpointGroupMembership(sql.ModelBase, sql.ModelDictMixin):
|
||||||
nullable=False)
|
nullable=False)
|
||||||
project_id = sql.Column(sql.String(64), nullable=False)
|
project_id = sql.Column(sql.String(64), nullable=False)
|
||||||
__table_args__ = (sql.PrimaryKeyConstraint('endpoint_group_id',
|
__table_args__ = (sql.PrimaryKeyConstraint('endpoint_group_id',
|
||||||
'project_id'), {})
|
'project_id'),)
|
||||||
|
|
|
@ -32,7 +32,7 @@ class PolicyAssociation(sql.ModelBase, sql.ModelDictMixin):
|
||||||
service_id = sql.Column(sql.String(64), nullable=True)
|
service_id = sql.Column(sql.String(64), nullable=True)
|
||||||
region_id = sql.Column(sql.String(64), nullable=True)
|
region_id = sql.Column(sql.String(64), nullable=True)
|
||||||
__table_args__ = (sql.UniqueConstraint('endpoint_id', 'service_id',
|
__table_args__ = (sql.UniqueConstraint('endpoint_id', 'service_id',
|
||||||
'region_id'), {})
|
'region_id'),)
|
||||||
|
|
||||||
def to_dict(self):
|
def to_dict(self):
|
||||||
"""Returns the model's attributes as a dictionary.
|
"""Returns the model's attributes as a dictionary.
|
||||||
|
|
|
@ -33,7 +33,7 @@ class User(sql.ModelBase, sql.DictBase):
|
||||||
default_project_id = sql.Column(sql.String(64))
|
default_project_id = sql.Column(sql.String(64))
|
||||||
# Unique constraint across two columns to create the separation
|
# Unique constraint across two columns to create the separation
|
||||||
# rather than just only 'name' being unique
|
# rather than just only 'name' being unique
|
||||||
__table_args__ = (sql.UniqueConstraint('domain_id', 'name'), {})
|
__table_args__ = (sql.UniqueConstraint('domain_id', 'name'),)
|
||||||
|
|
||||||
def to_dict(self, include_extra_dict=False):
|
def to_dict(self, include_extra_dict=False):
|
||||||
d = super(User, self).to_dict(include_extra_dict=include_extra_dict)
|
d = super(User, self).to_dict(include_extra_dict=include_extra_dict)
|
||||||
|
@ -52,7 +52,7 @@ class Group(sql.ModelBase, sql.DictBase):
|
||||||
extra = sql.Column(sql.JsonBlob())
|
extra = sql.Column(sql.JsonBlob())
|
||||||
# Unique constraint across two columns to create the separation
|
# Unique constraint across two columns to create the separation
|
||||||
# rather than just only 'name' being unique
|
# rather than just only 'name' being unique
|
||||||
__table_args__ = (sql.UniqueConstraint('domain_id', 'name'), {})
|
__table_args__ = (sql.UniqueConstraint('domain_id', 'name'),)
|
||||||
|
|
||||||
|
|
||||||
class UserGroupMembership(sql.ModelBase, sql.DictBase):
|
class UserGroupMembership(sql.ModelBase, sql.DictBase):
|
||||||
|
|
|
@ -32,7 +32,7 @@ class IDMapping(sql.ModelBase, sql.ModelDictMixin):
|
||||||
# Unique constraint to ensure you can't store more than one mapping to the
|
# Unique constraint to ensure you can't store more than one mapping to the
|
||||||
# same underlying values
|
# same underlying values
|
||||||
__table_args__ = (
|
__table_args__ = (
|
||||||
sql.UniqueConstraint('domain_id', 'local_id', 'entity_type'), {})
|
sql.UniqueConstraint('domain_id', 'local_id', 'entity_type'),)
|
||||||
|
|
||||||
|
|
||||||
@dependency.requires('id_generator_api')
|
@dependency.requires('id_generator_api')
|
||||||
|
|
|
@ -238,7 +238,7 @@ class Domain(sql.ModelBase, sql.DictBase):
|
||||||
name = sql.Column(sql.String(64), nullable=False)
|
name = sql.Column(sql.String(64), nullable=False)
|
||||||
enabled = sql.Column(sql.Boolean, default=True, nullable=False)
|
enabled = sql.Column(sql.Boolean, default=True, nullable=False)
|
||||||
extra = sql.Column(sql.JsonBlob())
|
extra = sql.Column(sql.JsonBlob())
|
||||||
__table_args__ = (sql.UniqueConstraint('name'), {})
|
__table_args__ = (sql.UniqueConstraint('name'),)
|
||||||
|
|
||||||
|
|
||||||
class Project(sql.ModelBase, sql.DictBase):
|
class Project(sql.ModelBase, sql.DictBase):
|
||||||
|
@ -257,4 +257,4 @@ class Project(sql.ModelBase, sql.DictBase):
|
||||||
server_default='0')
|
server_default='0')
|
||||||
# Unique constraint across two columns to create the separation
|
# Unique constraint across two columns to create the separation
|
||||||
# rather than just only 'name' being unique
|
# rather than just only 'name' being unique
|
||||||
__table_args__ = (sql.UniqueConstraint('domain_id', 'name'), {})
|
__table_args__ = (sql.UniqueConstraint('domain_id', 'name'),)
|
||||||
|
|
|
@ -285,7 +285,7 @@ class Domain(sql.ModelBase, sql.DictBase):
|
||||||
name = sql.Column(sql.String(64), nullable=False)
|
name = sql.Column(sql.String(64), nullable=False)
|
||||||
enabled = sql.Column(sql.Boolean, default=True, nullable=False)
|
enabled = sql.Column(sql.Boolean, default=True, nullable=False)
|
||||||
extra = sql.Column(sql.JsonBlob())
|
extra = sql.Column(sql.JsonBlob())
|
||||||
__table_args__ = (sql.UniqueConstraint('name'), {})
|
__table_args__ = (sql.UniqueConstraint('name'),)
|
||||||
|
|
||||||
|
|
||||||
class Project(sql.ModelBase, sql.DictBase):
|
class Project(sql.ModelBase, sql.DictBase):
|
||||||
|
@ -318,4 +318,4 @@ class Project(sql.ModelBase, sql.DictBase):
|
||||||
server_default='0')
|
server_default='0')
|
||||||
# Unique constraint across two columns to create the separation
|
# Unique constraint across two columns to create the separation
|
||||||
# rather than just only 'name' being unique
|
# rather than just only 'name' being unique
|
||||||
__table_args__ = (sql.UniqueConstraint('domain_id', 'name'), {})
|
__table_args__ = (sql.UniqueConstraint('domain_id', 'name'),)
|
||||||
|
|
Loading…
Reference in New Issue