equal
deleted
inserted
replaced
734 # postgres, sqlserver |
734 # postgres, sqlserver |
735 mo = re.search("unique_[a-z0-9]{32}", arg) |
735 mo = re.search("unique_[a-z0-9]{32}", arg) |
736 if mo is not None: |
736 if mo is not None: |
737 raise UniqueTogetherError(cnx, cstrname=mo.group(0)) |
737 raise UniqueTogetherError(cnx, cstrname=mo.group(0)) |
738 # old sqlite |
738 # old sqlite |
739 mo = re.search('columns (.*) are not unique', arg) |
739 mo = re.search('columns? (.*) (?:is|are) not unique', arg) |
740 if mo is not None: # sqlite in use |
740 if mo is not None: # sqlite in use |
741 # we left chop the 'cw_' prefix of attribute names |
741 # we left chop the 'cw_' prefix of attribute names |
742 rtypes = [c.strip()[3:] |
742 rtypes = [c.strip()[3:] |
743 for c in mo.group(1).split(',')] |
743 for c in mo.group(1).split(',')] |
744 raise UniqueTogetherError(cnx, rtypes=rtypes) |
744 raise UniqueTogetherError(cnx, rtypes=rtypes) |