equal
deleted
inserted
replaced
716 # postgres, sqlserver |
716 # postgres, sqlserver |
717 mo = re.search("unique_[a-z0-9]{32}", arg) |
717 mo = re.search("unique_[a-z0-9]{32}", arg) |
718 if mo is not None: |
718 if mo is not None: |
719 raise UniqueTogetherError(cnx, cstrname=mo.group(0)) |
719 raise UniqueTogetherError(cnx, cstrname=mo.group(0)) |
720 # old sqlite |
720 # old sqlite |
721 mo = re.search('columns (.*) are not unique', arg) |
721 mo = re.search('columns? (.*) (?:is|are) not unique', arg) |
722 if mo is not None: # sqlite in use |
722 if mo is not None: # sqlite in use |
723 # we left chop the 'cw_' prefix of attribute names |
723 # we left chop the 'cw_' prefix of attribute names |
724 rtypes = [c.strip()[3:] |
724 rtypes = [c.strip()[3:] |
725 for c in mo.group(1).split(',')] |
725 for c in mo.group(1).split(',')] |
726 raise UniqueTogetherError(cnx, rtypes=rtypes) |
726 raise UniqueTogetherError(cnx, rtypes=rtypes) |