misc/migration/3.10.7_Any.py
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 13 Jan 2011 19:18:16 +0100
branchstable
changeset 6819 bf5d9a1415e3
parent 6815 a84190d4e78c
child 6852 970d1aab42a1
permissions -rw-r--r--
Added tag cubicweb-version-3.10.7 for changeset 1959d97ebf2e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6815
a84190d4e78c [schema] fix pb with ambiguous relation used within UniqueTogetherConstraint by having CWUniqueTogetherConstraint.relation targeting CWRType instead of CWAttribute/CWRelation. This fixes 3.10.7 migration.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 6757
diff changeset
     1
add_relation_definition('CWUniqueTogetherConstraint', 'relations', 'CWRType')
a84190d4e78c [schema] fix pb with ambiguous relation used within UniqueTogetherConstraint by having CWUniqueTogetherConstraint.relation targeting CWRType instead of CWAttribute/CWRelation. This fixes 3.10.7 migration.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 6757
diff changeset
     2
rql('SET C relations RT WHERE C relations RDEF, RDEF relation_type RT')
a84190d4e78c [schema] fix pb with ambiguous relation used within UniqueTogetherConstraint by having CWUniqueTogetherConstraint.relation targeting CWRType instead of CWAttribute/CWRelation. This fixes 3.10.7 migration.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 6757
diff changeset
     3
commit()
a84190d4e78c [schema] fix pb with ambiguous relation used within UniqueTogetherConstraint by having CWUniqueTogetherConstraint.relation targeting CWRType instead of CWAttribute/CWRelation. This fixes 3.10.7 migration.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 6757
diff changeset
     4
drop_relation_definition('CWUniqueTogetherConstraint', 'relations', 'CWAttribute')
a84190d4e78c [schema] fix pb with ambiguous relation used within UniqueTogetherConstraint by having CWUniqueTogetherConstraint.relation targeting CWRType instead of CWAttribute/CWRelation. This fixes 3.10.7 migration.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 6757
diff changeset
     5
drop_relation_definition('CWUniqueTogetherConstraint', 'relations', 'CWRelation')
a84190d4e78c [schema] fix pb with ambiguous relation used within UniqueTogetherConstraint by having CWUniqueTogetherConstraint.relation targeting CWRType instead of CWAttribute/CWRelation. This fixes 3.10.7 migration.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 6757
diff changeset
     6
6757
bc878ec35794 #1382705 forbid with sql level locking the simultaneous fireing of a transition on a given entity
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
diff changeset
     7
add_attribute('TrInfo', 'tr_count')
bc878ec35794 #1382705 forbid with sql level locking the simultaneous fireing of a transition on a given entity
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
diff changeset
     8
sync_schema_props_perms('TrInfo')