FIX invalid link on user.fk_user
This commit is contained in:
parent
1d2c9c9df4
commit
6afda6a47a
@ -199,6 +199,15 @@ delete from llx_element_element where sourcetype='commande' and fk_source not in
|
|||||||
DELETE FROM llx_actioncomm_resources WHERE fk_actioncomm not in (select id from llx_actioncomm);
|
DELETE FROM llx_actioncomm_resources WHERE fk_actioncomm not in (select id from llx_actioncomm);
|
||||||
|
|
||||||
|
|
||||||
|
-- Fix link on parent that were removed
|
||||||
|
DROP table tmp_user;
|
||||||
|
CREATE TABLE tmp_user as (select * from llx_user);
|
||||||
|
UPDATE llx_user SET fk_user = NULL where fk_user NOT IN (select rowid from tmp_user);
|
||||||
|
|
||||||
|
|
||||||
|
update llx_user set fk_user = null where fk_user not in (select rowid from llx_user);
|
||||||
|
|
||||||
|
|
||||||
UPDATE llx_product SET canvas = NULL where canvas = 'default@product';
|
UPDATE llx_product SET canvas = NULL where canvas = 'default@product';
|
||||||
UPDATE llx_product SET canvas = NULL where canvas = 'service@product';
|
UPDATE llx_product SET canvas = NULL where canvas = 'service@product';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user