sql: Fixup for invalid unique constraint on external_id in access_rule table

There was a big drop of invalid constraints with [1]. One of them was on
`external_id` in the access_rule table.

While the change made it into a Alembic revision with [2], it still exists in
the schema causing an a new Alembic autogeneration to actually add it again as
a revision.

[1] https://review.opendev.org/c/openstack/keystone/+/851845
[2] 7d169870fe (diff-26484e3f6683ce7557e17b67220003784ff84fbe)

Closes-Bug: #1988297
Change-Id: I66626ba8771ef2aa8b3580fd3f5d15fd4b58ab48
This commit is contained in:
Christian Rohmann 2023-06-07 14:49:35 +02:00
parent 7dc175a41f
commit 90dcff07c0
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ class AccessRuleModel(sql.ModelBase, sql.ModelDictMixin):
__tablename__ = 'access_rule'
attributes = ['external_id', 'user_id', 'service', 'path', 'method']
id = sql.Column(sql.Integer, primary_key=True, nullable=False)
external_id = sql.Column(sql.String(64), index=True, unique=True)
external_id = sql.Column(sql.String(64), index=True)
user_id = sql.Column(sql.String(64), index=True)
service = sql.Column(sql.String(64))
path = sql.Column(sql.String(128))