-- Licensed Materials - Property of IBM
-- BI and PM: Mobile
-- (C) Copyright IBM Corp. 2007, 2012
-- 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 BASE_DOC varchar (200) 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_RENDERS ADD SMALL_THUMB varchar (200) 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_RENDERS ADD MEDIUM_THUMB varchar (200) 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_RENDERS ADD LARGE_THUMB varchar (200) 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_BLOBS ADD PATH varchar (200) 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_BLOBS ADD HASH char (32) NULL';
EXCEPTION
	WHEN TABLE_DOES_NOT_EXIST_EXCEPTION THEN
		NULL;
END;
/

DECLARE
	INDEX_EXISTS_EXCEPTION EXCEPTION;
	PRAGMA EXCEPTION_INIT (INDEX_EXISTS_EXCEPTION, -955);
BEGIN
	EXECUTE IMMEDIATE 'CREATE INDEX IDX_MOB_BLOBS_HASH ON MOB_BLOBS(HASH)';
EXCEPTION
	WHEN INDEX_EXISTS_EXCEPTION THEN
		NULL;
END;
/
