openidm.sql revision 305566ca908963c24913b497b446257e31671976
2e848e79ccf2e4285250a0af98ddb9eb28864878vboxsyncCREATE TABLE IF NOT EXISTS `openidm`.`objecttypes` (
2e848e79ccf2e4285250a0af98ddb9eb28864878vboxsync UNIQUE INDEX `idx_objecttypes_objecttype` (`objecttype` ASC) );
2e848e79ccf2e4285250a0af98ddb9eb28864878vboxsyncCREATE TABLE IF NOT EXISTS `openidm`.`genericobjects` (
2e848e79ccf2e4285250a0af98ddb9eb28864878vboxsync UNIQUE INDEX `idx_genericobjects_object` (`objecttypes_id` ASC, `objectid` ASC) ,
2e848e79ccf2e4285250a0af98ddb9eb28864878vboxsync ON UPDATE NO ACTION) ;
2e848e79ccf2e4285250a0af98ddb9eb28864878vboxsync CREATE INDEX IF NOT EXISTS `openidm`.`fk_genericobjects_objecttypes`
2e848e79ccf2e4285250a0af98ddb9eb28864878vboxsync ON `openidm`.`genericobjects` ( `objecttypes_id` ASC );
2e848e79ccf2e4285250a0af98ddb9eb28864878vboxsyncCREATE TABLE IF NOT EXISTS `openidm`.`genericobjectproperties` (
CONSTRAINT `fk_genericobjectproperties_genericobjects`
ON DELETE CASCADE
ON UPDATE NO ACTION);
CREATE INDEX IF NOT EXISTS `openidm`.`idx_genericobjectproperties_prop` ON `openidm`.`genericobjectproperties` (`propkey` ASC, `propvalue` ASC);
CONSTRAINT `fk_managedobjects_objectypes`
ON DELETE CASCADE
ON UPDATE NO ACTION);
CREATE INDEX IF NOT EXISTS `openidm`.`fk_managedobjects_objectypes` ON `openidm`.`managedobjects` (`objecttypes_id` ASC) ;
CONSTRAINT `fk_managedobjectproperties_managedobjects`
ON DELETE CASCADE
ON UPDATE NO ACTION);
CREATE INDEX IF NOT EXISTS `openidm`.`idx_managedobjectproperties_prop` ON `openidm`.`managedobjectproperties` (`propkey` ASC, `propvalue` ASC);
CREATE INDEX IF NOT EXISTS `openidm`.`fk_managedobjectproperties_managedobjects` ON `openidm`.`managedobjectproperties` (`managedobjects_id` ASC);
CONSTRAINT `fk_configobjects_objecttypes`
ON DELETE CASCADE
ON UPDATE NO ACTION);
CREATE INDEX IF NOT EXISTS `openidm`.`fk_configobjects_objecttypes` ON `openidm`.`configobjects`(`objecttypes_id` ASC);
CONSTRAINT `fk_configobjectproperties_configobjects`
ON DELETE CASCADE
ON UPDATE NO ACTION);
CREATE INDEX IF NOT EXISTS `openidm`.`fk_configobjectproperties_configobjects` ON `openidm`.`configobjectproperties`(`configobjects_id` ASC);
CREATE INDEX IF NOT EXISTS `openidm`.`idx_configobjectproperties_prop` ON `openidm`.`configobjectproperties`(`propkey` ASC, `propvalue` ASC);
CREATE INDEX IF NOT EXISTS `openidm`.`idx_auditrecon_transactionid` ON `openidm`.`auditrecon` (`transactionid` ASC);
CREATE INDEX IF NOT EXISTS `openidm`.`idx_auditrecon_targetobjectid` ON `openidm`.`auditrecon`(`targetobjectid` ASC);
CREATE INDEX IF NOT EXISTS `openidm`.`idx_auditrecon_sourceobjectid` ON `openidm`.`auditrecon`(`sourceobjectid` ASC);
CREATE INDEX IF NOT EXISTS `openidm`.`idx_auditrecon_activitydate` ON `openidm`.`auditrecon`(`activitydate` ASC);
CREATE INDEX IF NOT EXISTS `openidm`.`idx_auditrecon_entrytype` ON `openidm`.`auditrecon`(`entrytype` ASC);
CREATE INDEX IF NOT EXISTS `openidm`.`idx_auditrecon_situation` ON `openidm`.`auditrecon`(`situation` ASC);
CREATE INDEX IF NOT EXISTS `openidm`.`idx_auditrecon_status` ON `openidm`.`auditrecon`(`status` ASC);
CREATE INDEX IF NOT EXISTS `openidm`.`idx_auditconfig_transactionid` ON `openidm`.`auditconfig`(`transactionid` ASC);
CREATE INDEX IF NOT EXISTS `openidm`.`idx_auditactivity_transactionid` ON `openidm`.`auditactivity`(`transactionid` ASC);
CONSTRAINT `fk_schedulerobjects_objectypes`
ON DELETE CASCADE
ON UPDATE NO ACTION);
CREATE INDEX IF NOT EXISTS `openidm`.`fk_schedulerobjects_objectypes` ON `openidm`.`schedulerobjects` (`objecttypes_id` ASC);
CONSTRAINT `fk_schedulerobjectproperties_schedulerobjects`
ON DELETE CASCADE
ON UPDATE NO ACTION);
CREATE INDEX IF NOT EXISTS `openidm`.`fk_schedulerobjectproperties_schedulerobjects` ON `openidm`.`schedulerobjectproperties`(`schedulerobjects_id` ASC);
CREATE INDEX IF NOT EXISTS `openidm`.`idx_schedulerobjectproperties_prop` ON `openidm`.`schedulerobjectproperties`(`propkey` ASC, `propvalue` ASC);
CONSTRAINT `fk_clusterobjects_objectypes`
ON DELETE CASCADE
ON UPDATE NO ACTION);
CREATE INDEX IF NOT EXISTS `openidm`.`fk_clusterobjects_objectypes` ON `openidm`.`clusterobjects` (`objecttypes_id` ASC);
CONSTRAINT `fk_clusterobjectproperties_clusterobjects`
ON DELETE CASCADE
ON UPDATE NO ACTION);
CREATE INDEX IF NOT EXISTS `fk_clusterobjectproperties_clusterobjects` ON `openidm`.`clusterobjectproperties` (`clusterobjects_id` ASC);
CREATE INDEX IF NOT EXiSTS `idx_clusterobjectproperties_prop` ON `openidm`.`clusterobjectproperties` (`propkey` ASC, `propvalue` ASC);
WHERE NOT EXISTS (SELECT * FROM `openidm`.`internalrole` WHERE `objectid` = 'openidm-tasks-manager')