-- Licensed Materials - Property of IBM
-- BI and PM: Mobile
-- (C) Copyright IBM Corp. 2013
-- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

DECLARE
	TABLE_DOES_NOT_EXIST_EXCEPTION EXCEPTION;
	PRAGMA EXCEPTION_INIT(TABLE_DOES_NOT_EXIST_EXCEPTION, -942);
BEGIN
	EXECUTE IMMEDIATE 'ALTER TABLE MOB_RENDERS ADD OUTPUT_TYPE_MASK int NULL';
EXCEPTION
	WHEN TABLE_DOES_NOT_EXIST_EXCEPTION THEN
		NULL;
END;
/

DECLARE
	TABLE_DOES_NOT_EXIST_EXCEPTION EXCEPTION;
	PRAGMA EXCEPTION_INIT(TABLE_DOES_NOT_EXIST_EXCEPTION, -942);
BEGIN
	EXECUTE IMMEDIATE 'ALTER TABLE MOB_RESOURCES ADD DOWNLOAD_URL varchar (200) NULL';
EXCEPTION
	WHEN TABLE_DOES_NOT_EXIST_EXCEPTION THEN
		NULL;
END;
/





DECLARE
	TABLE_EXISTS_EXCEPTION EXCEPTION;
	PRAGMA EXCEPTION_INIT (TABLE_EXISTS_EXCEPTION, -955);
BEGIN
	EXECUTE IMMEDIATE 'CREATE TABLE MOB_RENDER_TYPES ( TYPE INT NOT NULL, DESCRIPTION varchar (100) NULL )';
	EXECUTE IMMEDIATE 'INSERT INTO MOB_RENDER_TYPES values (1, ''VMDB'')';
	EXECUTE IMMEDIATE 'INSERT INTO MOB_RENDER_TYPES values (2, ''CCSHTML'')';
	EXECUTE IMMEDIATE 'INSERT INTO MOB_RENDER_TYPES values (4, ''CCSHTMLI'')';
	EXECUTE IMMEDIATE 'INSERT INTO MOB_RENDER_TYPES values (8, ''VIEWERHTML'')';
EXCEPTION
	WHEN TABLE_EXISTS_EXCEPTION THEN
		NULL;
END;
/

DECLARE
	TABLE_DOES_NOT_EXIST_EXCEPTION EXCEPTION;
	PRAGMA EXCEPTION_INIT(TABLE_DOES_NOT_EXIST_EXCEPTION, -942);
BEGIN
	EXECUTE IMMEDIATE 'ALTER TABLE MOB_RENDERS ADD HAS_MORE_PAGES smallint NULL';
EXCEPTION
	WHEN TABLE_DOES_NOT_EXIST_EXCEPTION THEN
		NULL;
END;
/