# HG changeset patch # User Sylvain Thénault # Date 1288013489 -7200 # Node ID 27402fe6a94a844f6a497422dd57f9e20a3b9702 # Parent 11c09415078b2f7486a5799fe934271a60682175 [core schema] CWSourceHostConfig.match_host only unique per source diff -r 11c09415078b -r 27402fe6a94a misc/migration/3.10.5_Any.py --- a/misc/migration/3.10.5_Any.py Mon Oct 25 15:30:50 2010 +0200 +++ b/misc/migration/3.10.5_Any.py Mon Oct 25 15:31:29 2010 +0200 @@ -1,3 +1,4 @@ +sync_schema_props_perms('CWSourceHostConfig', syncperms=False) sql('INSERT INTO cw_source_relation(eid_from, eid_to) ' 'SELECT e.eid,s.cw_eid FROM entities as e, cw_CWSource as s ' diff -r 11c09415078b -r 27402fe6a94a schemas/base.py --- a/schemas/base.py Mon Oct 25 15:30:50 2010 +0200 +++ b/schemas/base.py Mon Oct 25 15:31:29 2010 +0200 @@ -261,7 +261,8 @@ 'update': ('managers',), 'delete': ('managers',), } - match_host = String(required=True, unique=True, maxsize=128, + __unique_together__ = [('match_host', 'cw_host_config_of')] + match_host = String(required=True, maxsize=128, description=_('regexp matching host(s) to which this config applies')) config = String(required=True, description=_('Source\'s configuration for a particular host. '