
ALTER TABLE SENDMAIL_QUEUE ADD COLUMN BUSINESS_KEY VARCHAR(100);
ALTER TABLE SENDMAIL_QUEUE ADD COLUMN APP_ID BIGINT;
ALTER TABLE SENDMAIL_QUEUE ADD CONSTRAINT FK_SENDMAIL_QUEUE_APP FOREIGN KEY(APP_ID) REFERENCES SENDMAIL_APP(ID);

ALTER TABLE SENDMAIL_HISTORY ADD COLUMN BUSINESS_KEY VARCHAR(100);
ALTER TABLE SENDMAIL_HISTORY ADD COLUMN APP_ID BIGINT;
ALTER TABLE SENDMAIL_HISTORY ADD CONSTRAINT FK_SENDMAIL_HISTORY_APP FOREIGN KEY(APP_ID) REFERENCES SENDMAIL_APP(ID);

