keystone/keystone
Stephen Finucane 535bc8e22e sql: Remove duplicate constraints
A primary key is automatically unique, therefore if one or columns is
included in a primary key constraint there is no need to add a separate
unique constraint for these columns. Remove it.

Note that this only affects MySQL. Both SQLite and PostgreSQL appear to
ignore the duplicate unique constraint. As a result, it was necessary to
run auto-generation against MySQL instead of the default SQLite. The
actual command used was similar to what we normally do, however.

  $ python keystone/common/sql/migrations/manage.py revision \
      --autogenerate --message 'Remove duplicate constraints'

As always, the resulting schema migrations then needed some manual
tweaks to remove "please adjust!" comments and unnecessary imports but
they are correct.

Change-Id: I64252086f994901a5ebe05afec37a6afd3a192ee
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-04-06 11:23:03 +01:00
..
api requirements: Bump linter requirements 2022-10-26 15:14:21 +03:00
application_credential db: Replace use of reverse cascades 2023-02-28 17:26:39 +00:00
assignment db: Replace use of Query.get() 2023-02-28 17:26:39 +00:00
auth Add expiring user group memberships on mapped authentication 2020-04-07 19:30:57 -04:00
catalog db: Replace use of Query.get() 2023-02-28 17:26:39 +00:00
cmd db: Remove legacy migrations 2023-02-28 17:26:39 +00:00
common sql: Remove duplicate constraints 2023-04-06 11:23:03 +01:00
conf Force algo specific maximum length 2023-02-22 14:43:35 -06:00
credential db: Replace use of Query.get() 2023-02-28 17:26:39 +00:00
endpoint_policy Remove six usage 2020-01-30 06:06:51 +00:00
federation db: Replace use of Query.get() 2023-02-28 17:26:39 +00:00
identity db: Replace use of Query.get() 2023-02-28 17:26:39 +00:00
limit Remove six usage 2020-01-30 06:06:51 +00:00
locale Imported Translations from Zanata 2022-09-08 03:35:35 +00:00
models fix E225 missing whitespace around operator 2020-11-27 13:21:26 +01:00
oauth1 db: Replace use of Query.get() 2023-02-28 17:26:39 +00:00
oauth2 OAuth2.0 Client Credentials Grant Flow Support 2022-06-14 09:09:33 +00:00
policy db: Replace use of Query.get() 2023-02-28 17:26:39 +00:00
receipt Remove six usage 2020-01-30 06:06:51 +00:00
resource sql: Remove duplicate constraints 2023-04-06 11:23:03 +01:00
revoke requirements: Bump linter requirements 2022-10-26 15:14:21 +03:00
server Merge "OAuth2.0 Client Credentials Grant Flow Support" 2022-08-26 17:09:42 +00:00
tests sql: Remove duplicate constraints 2023-04-06 11:23:03 +01:00
token Limit token expiration to application credential expiration 2022-10-21 12:36:39 -05:00
trust db: Replace use of Query.get() 2023-02-28 17:26:39 +00:00
__init__.py Revert "Disable eventlet monkey-patching of DNS" 2013-05-10 10:24:48 -04:00
exception.py OAuth2.0 Client Credentials Grant Flow Support 2022-06-14 09:09:33 +00:00
i18n.py Fix translated response 2019-08-19 14:49:37 +08:00
notifications.py Hide AccountLocked exception from end users 2021-04-23 13:43:42 -05:00
version.py Add expiring user group memberships on mapped authentication 2020-04-07 19:30:57 -04:00