Fix: pgsql upgrade
This commit is contained in:
parent
0e073038ad
commit
eead2977d9
@ -92,15 +92,13 @@ alter table llx_societe_rib CHANGE COLUMN adresse_proprio owner_address text;
|
||||
alter table llx_societe_address CHANGE COLUMN ville town text;
|
||||
alter table llx_societe_address CHANGE COLUMN cp zip varchar(10);
|
||||
|
||||
alter table llx_facture_fourn CHANGE COLUMN facnumber ref_supplier varchar(30);
|
||||
|
||||
-- remove constraint and index before rename field
|
||||
ALTER TABLE llx_expedition DROP FOREIGN KEY fk_expedition_fk_expedition_methode;
|
||||
ALTER TABLE llx_expedition DROP FOREIGN KEY fk_expedition_fk_shipping_method;
|
||||
ALTER TABLE llx_expedition DROP INDEX idx_expedition_fk_expedition_methode;
|
||||
ALTER TABLE llx_expedition CHANGE COLUMN fk_expedition_methode fk_shipping_method integer;
|
||||
-- and create the new index and constraint
|
||||
ALTER TABLE llx_expedition ADD INDEX idx_expedition_fk_shipping_method (fk_shipping_method);
|
||||
ALTER TABLE llx_expedition ADD CONSTRAINT fk_expedition_fk_shipping_method FOREIGN KEY (fk_shipping_method) REFERENCES llx_c_shipment_mode (rowid);
|
||||
|
||||
alter table llx_facture_fourn CHANGE COLUMN facnumber ref_supplier varchar(30);
|
||||
|
||||
ALTER TABLE llx_c_shipment_mode ADD COLUMN tracking VARCHAR(256) NOT NULL DEFAULT '' AFTER description;
|
||||
|
||||
@ -113,6 +111,10 @@ ALTER TABLE llx_c_shipment_mode ADD COLUMN tracking VARCHAR(256) NOT NULL DEFAUL
|
||||
-- VPGSQL8.2 DROP table llx_c_shipment_mode;
|
||||
-- VPGSQL8.2 CREATE TABLE llx_c_shipment_mode (rowid SERIAL PRIMARY KEY, tms timestamp, code varchar(30) NOT NULL, libelle varchar(50) NOT NULL, description text, tracking varchar(256) NOT NULL, active integer DEFAULT 0, module varchar(32) NULL);
|
||||
|
||||
-- and create the new index and constraint
|
||||
ALTER TABLE llx_expedition ADD INDEX idx_expedition_fk_shipping_method (fk_shipping_method);
|
||||
ALTER TABLE llx_expedition ADD CONSTRAINT fk_expedition_fk_shipping_method FOREIGN KEY (fk_shipping_method) REFERENCES llx_c_shipment_mode (rowid);
|
||||
|
||||
|
||||
|
||||
ALTER TABLE llx_stock_mouvement MODIFY COLUMN value real;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user