CC-5230 : cc_pref can have duplicate keystrs when subjid is null
This commit is contained in:
parent
440163f199
commit
580c2960ef
1 changed files with 14 additions and 1 deletions
|
@ -1,3 +1,16 @@
|
|||
DELETE FROM cc_pref WHERE id IN (
|
||||
SELECT cc_pref.id
|
||||
FROM cc_pref
|
||||
LEFT OUTER JOIN (
|
||||
SELECT MAX(id) as id, keystr, subjid
|
||||
FROM cc_pref
|
||||
GROUP BY keystr, subjid
|
||||
) as KeepRows ON
|
||||
cc_pref.id = KeepRows.id
|
||||
WHERE
|
||||
KeepRows.id IS NULL
|
||||
);
|
||||
|
||||
DELETE FROM cc_pref WHERE keystr = 'system_version';
|
||||
INSERT INTO cc_pref (keystr, valstr) VALUES ('system_version', '2.4.0');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue