Questions tagged «database-integrity»

11
IntegrityError重复键值违反唯一约束-django / postgres
我正在跟我刚才提出的一个问题进行跟进,在这个问题中,我寻求从愚蠢/编写不佳的mysql查询转换为postgresql。我相信我成功了。无论如何,我使用的是从mysql数据库手动移动到postgres数据库的数据。我正在使用如下查询: """ UPDATE krypdos_coderound cru set is_correct = case when t.kv_values1 = t.kv_values2 then True else False end from (select cr.id, array_agg( case when kv1.code_round_id = cr.id then kv1.option_id else null end ) as kv_values1, array_agg( case when kv2.code_round_id = cr_m.id then kv2.option_id else null end ) as kv_values2 from …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.