--ABSN-8431 Peppol financial interface modification
CREATE TABLE ABS_VIEW_VERSION
( VIEWNAME VARCHAR2(42) NOT NULL,
  VERSION NUMBER(2) DEFAULT 1 NOT NULL,
  DESCRIPTION VARCHAR2(120));
COMMENT ON TABLE ABS_VIEW_VERSION
  IS 'Can only have 1 row per view';
ALTER TABLE ABS_VIEW_VERSION
  ADD CONSTRAINT PK_ABS_VIEW_VERSION PRIMARY KEY (VIEWNAME);

BEGIN 
--Version number for Peppol, old version 2, new is 3
EXECUTE IMMEDIATE 'INSERT INTO ABS_VIEW_VERSION(VIEWNAME, VERSION, DESCRIPTION) VALUES(''V_XML_PEPPOL_BILLING'',3, ''Version number for Peppol, old version 2, new is 3'') ';
COMMIT;
EXCEPTION 
	WHEN DUP_VAL_ON_INDEX
	THEN
		NULL;
END;
/

ALTER TABLE COUNTRY ADD ISO6523ICD VARCHAR2(4);
COMMENT ON COLUMN COUNTRY.ISO6523ICD
  IS 'From Peppol ISO 6523 ICD list';
