# HG changeset patch # User Mads Kiilerich # Date 1530489349 -7200 # Node ID bc166701b0c58ab333f924dfb6c03801a3636cdd # Parent b22501293b304bc64a90ff9f4a2d38f4a0a20441 db: drop constraint that started failing with MariaDB 10.2 / MySQL 5.7 (Issue #324) The constraint was to prevent simple recursive parent references, but it only checked direct parents. We thus have to rely on the high level application maintaining the invariant anyway. diff -r b22501293b30 -r bc166701b0c5 kallithea/model/db.py --- a/kallithea/model/db.py Tue Jun 12 23:30:41 2018 +0200 +++ b/kallithea/model/db.py Mon Jul 02 01:55:49 2018 +0200 @@ -1478,7 +1478,6 @@ __tablename__ = 'groups' __table_args__ = ( UniqueConstraint('group_name', 'group_parent_id'), - CheckConstraint('group_id != group_parent_id'), {'extend_existing': True, 'mysql_engine': 'InnoDB', 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}, ) @@ -1897,7 +1896,6 @@ __tablename__ = 'user_group_user_group_to_perm' __table_args__ = ( UniqueConstraint('target_user_group_id', 'user_group_id', 'permission_id'), - CheckConstraint('target_user_group_id != user_group_id'), {'extend_existing': True, 'mysql_engine': 'InnoDB', 'mysql_charset': 'utf8', 'sqlite_autoincrement': True} )