Mercurial > kallithea
changeset 7335:bc166701b0c5 stable
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.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Mon, 02 Jul 2018 01:55:49 +0200 |
parents | b22501293b30 |
children | b45994c0779e 21084a951cd9 |
files | kallithea/model/db.py |
diffstat | 1 files changed, 0 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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} )