Update sql patch the not null constraint on quant_* is removed
This commit is contained in:
parent
2f2e18c6ac
commit
b0038919ef
1 changed files with 3 additions and 1 deletions
|
|
@ -1,7 +1,9 @@
|
|||
alter table jrnx add f_id bigint;
|
||||
alter table jrnx alter f_id set default null;
|
||||
update jrnx set f_id=(select f_id from fiche join jnt_fic_att_value using(f_id) join attr_value using(jft_id) where ad_id=23 and av_text=jrnx.j_qcode);
|
||||
alter table quant_sold alter qs_internal drop not null;
|
||||
alter table quant_purchase alter qp_internal drop not null;
|
||||
|
||||
ALTER TABLE jrnx ADD CONSTRAINT jrnx_f_id_fkey FOREIGN KEY (f_id) REFERENCES fiche (f_id) MATCH SIMPLE ON UPDATE update ON DELETE NO ACTION;
|
||||
ALTER TABLE jrnx ADD CONSTRAINT jrnx_f_id_fkey FOREIGN KEY (f_id) REFERENCES fiche (f_id) MATCH SIMPLE ON UPDATE cascade ON DELETE NO ACTION;
|
||||
CREATE INDEX fki_jrnx_f_id ON jrnx USING btree (f_id);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue