initialize-schema-version-table.sql 683 B

1234567891011121314151617181920
  1. -- Licensed Materials - Property of IBM
  2. -- BI and PM: Mobile
  3. -- (C) Copyright IBM Corp. 2007, 2012
  4. -- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  5. --
  6. -- Mobile database table creation scripts for MS SQL 2000.
  7. -- MOB_SCHEMA_VERSION
  8. DECLARE
  9. TABLE_EXISTS_EXCEPTION EXCEPTION;
  10. PRAGMA EXCEPTION_INIT (TABLE_EXISTS_EXCEPTION, -955);
  11. BEGIN
  12. EXECUTE IMMEDIATE 'CREATE TABLE MOB_SCHEMA_VERSION ( MAJOR INT NOT NULL, MINOR INT NOT NULL, SUBMINOR VARCHAR (4) NULL )';
  13. EXECUTE IMMEDIATE 'INSERT INTO MOB_SCHEMA_VERSION (MAJOR, MINOR) values (0, 0)';
  14. EXCEPTION
  15. WHEN TABLE_EXISTS_EXCEPTION THEN
  16. NULL;
  17. END;
  18. /