--ABS-111141
CREATE TABLE INVOICEHEADERXML
(
  INVOICEHEADER_ID    NUMBER NOT NULL,
  INVOICEDATA         CLOB NOT NULL,
  STATUS              NUMBER DEFAULT 0 NOT NULL,
  SYSTEMUSER_ID       NUMBER NOT NULL,
  TIMESTAMP           DATE NOT NULL
);
COMMENT ON COLUMN INVOICEHEADERXML.STATUS
  IS '0 = New (Default)
1 = Exported
-1 = Error during export, or less then 0';
COMMENT ON COLUMN INVOICEHEADERXML.INVOICEDATA
  IS 'Field to store the invoice data in XML format';
ALTER TABLE INVOICEHEADERXML
  ADD CONSTRAINT XPINVOICEHEADERXML PRIMARY KEY (INVOICEHEADER_ID);
CREATE INDEX INDX_INVOICEHEADERXML_STATUS ON INVOICEHEADERXML(STATUS);