openidm.sql revision 9d3e6fa80cdd33faea42702d2cfba74dea61a9c9
-- DROP SEQUENCE genericobjects_id_SEQ;
CREATE SEQUENCE genericobjects_id_SEQ
-- DROP SEQUENCE configobjects_id_SEQ;
CREATE SEQUENCE configobjects_id_SEQ
-- DROP SEQUENCE managedobjects_id_SEQ;
CREATE SEQUENCE managedobjects_id_SEQ
-- DROP SEQUENCE schedulerobjects_id_SEQ;
CREATE SEQUENCE schedulerobjects_id_SEQ
-- DROP SEQUENCE clusterobjects_id_SEQ;
CREATE SEQUENCE clusterobjects_id_SEQ
-- DROP SEQUENCE objecttypes_id_SEQ;
CREATE SEQUENCE objecttypes_id_SEQ
-- DROP TABLE auditaccess CASCADE CONSTRAINTS;
CREATE TABLE auditaccess (
principal CLOB,
);
;
ALTER TABLE auditaccess
(
)
;
-- DROP TABLE uinotification CASCADE CONSTRAINTS;
CREATE TABLE uinotification (
);
ALTER TABLE uinotification
(
)
;
-- DROP TABLE auditactivity CASCADE CONSTRAINTS;
CREATE TABLE auditactivity (
message CLOB,
requester CLOB,
approver CLOB,
subjectbefore CLOB,
subjectafter CLOB,
);
;
ALTER TABLE auditactivity
(
)
;
(
)
;
-- DROP TABLE auditrecon CASCADE CONSTRAINTS;
CREATE TABLE auditrecon (
ambiguoustargetobjectids CLOB,
message CLOB,
exceptiondetail CLOB,
messagedetail CLOB
);
;
ALTER TABLE auditrecon
(
)
;
-- DROP TABLE auditsync CASCADE CONSTRAINTS;
CREATE TABLE auditsync (
message CLOB,
exceptiondetail CLOB,
messagedetail CLOB
);
;
ALTER TABLE auditsync
(
)
;
-- DROP TABLE configobjectproperties CASCADE CONSTRAINTS;
CREATE TABLE configobjectproperties (
);
(
)
;
(
)
;
-- DROP TABLE configobjects CASCADE CONSTRAINTS;
CREATE TABLE configobjects (
fullobject CLOB
);
ALTER TABLE configobjects
(
)
;
(
)
;
(
)
;
-- DROP TABLE genericobjectproperties CASCADE CONSTRAINTS;
CREATE TABLE genericobjectproperties (
);
(
)
;
(
)
;
-- DROP TABLE genericobjects CASCADE CONSTRAINTS;
CREATE TABLE genericobjects (
fullobject CLOB
);
ALTER TABLE genericobjects
(
)
;
(
)
;
(
)
;
-- DROP TABLE internaluser CASCADE CONSTRAINTS;
CREATE TABLE internaluser (
);
ALTER TABLE internaluser
(
)
;
-- DROP TABLE links CASCADE CONSTRAINTS;
CREATE TABLE links (
);
ALTER TABLE links
(
)
;
(
)
;
(
)
;
-- DROP TABLE security CASCADE CONSTRAINTS;
CREATE TABLE security (
storestring CLOB
);
ALTER TABLE security
(
)
;
-- DROP TABLE securitykeys CASCADE CONSTRAINTS;
CREATE TABLE securitykeys (
keypair CLOB
);
ALTER TABLE securitykeys
(
)
;
-- DROP TABLE managedobjectproperties CASCADE CONSTRAINTS;
CREATE TABLE managedobjectproperties (
);
(
)
;
(
)
;
-- DROP TABLE managedobjects CASCADE CONSTRAINTS;
CREATE TABLE managedobjects (
fullobject CLOB
);
ALTER TABLE managedobjects
(
)
;
(
)
;
(
)
;
-- DROP TABLE schedobjectproperties CASCADE CONSTRAINTS;
CREATE TABLE schedobjectproperties (
);
(
)
;
(
)
;
-- DROP TABLE schedulerobjects CASCADE CONSTRAINTS;
CREATE TABLE schedulerobjects (
fullobject CLOB
);
ALTER TABLE schedulerobjects
(
)
;
(
)
;
(
)
;
-- DROP TABLE clusterobjectproperties CASCADE CONSTRAINTS;
CREATE TABLE clusterobjectproperties (
);
(
)
;
(
)
;
-- DROP TABLE clusterobjects CASCADE CONSTRAINTS;
CREATE TABLE clusterobjects (
fullobject CLOB
);
ALTER TABLE clusterobjects
(
)
;
(
)
;
(
)
;
-- DROP TABLE objecttypes CASCADE CONSTRAINTS;
CREATE TABLE objecttypes (
);
ALTER TABLE objecttypes
(
)
;
(
)
;
ALTER TABLE configobjectproperties
(
)
REFERENCES configobjects
(
)
ON DELETE CASCADE
;
ALTER TABLE configobjects
(
)
REFERENCES objecttypes
(
)
ON DELETE CASCADE
;
ALTER TABLE genericobjects
(
)
REFERENCES objecttypes
(
)
ON DELETE CASCADE
;
ALTER TABLE managedobjectproperties
(
)
REFERENCES managedobjects
(
)
ON DELETE CASCADE
;
ALTER TABLE managedobjects
(
)
REFERENCES objecttypes
(
)
ON DELETE CASCADE
;
ALTER TABLE genericobjectproperties
(
)
REFERENCES genericobjects
(
)
ON DELETE CASCADE
;
FOR EACH ROW
DECLARE
BEGIN
-- If this is the first time this table have been inserted into (sequence == 1)
--get the max indentity value from the table
--set the sequence to that value
END LOOP;
END IF;
--used to emulate LAST_INSERT_ID()
--mysql_utilities.identity := v_newVal;
-- assign the value from the sequence to emulate the identity column
END IF;
END;
/
FOR EACH ROW
DECLARE
BEGIN
-- If this is the first time this table have been inserted into (sequence == 1)
--get the max indentity value from the table
--set the sequence to that value
END LOOP;
END IF;
--used to emulate LAST_INSERT_ID()
--mysql_utilities.identity := v_newVal;
-- assign the value from the sequence to emulate the identity column
END IF;
END;
/
FOR EACH ROW
DECLARE
BEGIN
-- If this is the first time this table have been inserted into (sequence == 1)
--get the max indentity value from the table
--set the sequence to that value
END LOOP;
END IF;
--used to emulate LAST_INSERT_ID()
--mysql_utilities.identity := v_newVal;
-- assign the value from the sequence to emulate the identity column
END IF;
END;
/
FOR EACH ROW
DECLARE
BEGIN
-- If this is the first time this table have been inserted into (sequence == 1)
--get the max indentity value from the table
--set the sequence to that value
END LOOP;
END IF;
--used to emulate LAST_INSERT_ID()
--mysql_utilities.identity := v_newVal;
-- assign the value from the sequence to emulate the identity column
END IF;
END;
/
FOR EACH ROW
DECLARE
BEGIN
-- If this is the first time this table have been inserted into (sequence == 1)
--get the max indentity value from the table
--set the sequence to that value
END LOOP;
END IF;
--used to emulate LAST_INSERT_ID()
--mysql_utilities.identity := v_newVal;
-- assign the value from the sequence to emulate the identity column
END IF;
END;
/
FOR EACH ROW
DECLARE
BEGIN
-- If this is the first time this table have been inserted into (sequence == 1)
--get the max indentity value from the table
--set the sequence to that value
END LOOP;
END IF;
--used to emulate LAST_INSERT_ID()
--mysql_utilities.identity := v_newVal;
-- assign the value from the sequence to emulate the identity column
END IF;
END;
/
INSERT INTO internaluser (objectid, rev, pwd, roles) VALUES ('openidm-admin', '0', 'openidm-admin', 'openidm-admin,openidm-authorized');
INSERT INTO internaluser (objectid, rev, pwd, roles) VALUES ('anonymous', '0', 'anonymous', 'openidm-reg');
COMMIT;