# HG changeset patch # User Mads Kiilerich # Date 2020-05-22 14:02:55 # Node ID 642e6d7d18c4740b9aa4c7d15bf7720bc0f956da # Parent 04908b44005c0c9c4e5859661be78835050e8879 db: drop double specification of unique constraint (Issue #374) Consistently use "unique=True" for single column constraints. Only use UniqueConstraint for composite constraints. MySQL did not like this double specification, while PostgreSQL and SQLite did not care. diff --git a/kallithea/model/db.py b/kallithea/model/db.py --- a/kallithea/model/db.py +++ b/kallithea/model/db.py @@ -2295,7 +2295,6 @@ class UserSshKeys(Base, BaseDbModel): __tablename__ = 'user_ssh_keys' __table_args__ = ( Index('usk_fingerprint_idx', 'fingerprint'), - UniqueConstraint('fingerprint'), _table_args_default_dict ) __mapper_args__ = {}