-
Notifications
You must be signed in to change notification settings - Fork 0
/
foreignkeys and indexes.sql
34 lines (24 loc) · 1.34 KB
/
foreignkeys and indexes.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
-- Foreign Key Constraints
ALTER TABLE `PercolationStep` DROP FOREIGN KEY `FKB547075E29F27E9C` ;
ALTER TABLE `PercolationStep` ADD FOREIGN KEY ( `root` ) REFERENCES `parade`.`PercolationStep` (
`percolationstep`
) ON DELETE CASCADE ON UPDATE CASCADE ;
ALTER TABLE `PercolationStep` DROP FOREIGN KEY `FKB547075EDDD0B8B1` ;
ALTER TABLE `PercolationStep` ADD FOREIGN KEY ( `previous` ) REFERENCES `parade`.`PercolationStep` (
`percolationstep`
) ON DELETE CASCADE ON UPDATE CASCADE ;
-- Indexes for optimalisation of the queries
CREATE INDEX `IDX_OBJECTURL` ON ALE (`objectURL`);
CREATE INDEX `IDX_FOCUS` ON `ALE` (`focus`);
CREATE INDEX `IDX_NIMBUS` ON `ALE` (`nimbus`);
CREATE INDEX `IDX_OBJECTURL` ON `MatchedAetherEvent` (`objectURL`);
CREATE INDEX `IDX_ACTOR` ON `MatchedAetherEvent` (`actor`);
CREATE INDEX `IDX_SUBJECT` ON `PercolationRule` (`subject`);
CREATE INDEX `IDX_PREDICATE` ON `PercolationRule` (`predicate`);
CREATE INDEX `IDX_ACTIVE` ON `PercolationRule` (`active`);
CREATE INDEX `IDX_OBJECTURL` ON `PercolationStep` (`objectURL`);
CREATE INDEX `IDX_FOCUS` ON `PercolationStep` (`focus`);
CREATE INDEX `IDX_NIMBUS` ON `PercolationStep` (`nimbus`);
CREATE INDEX `IDX_ROWNAME` ON `Row` (`rowname`);
CREATE INDEX `IDX_TOURL` ON `_org_makumba_devel_relations_relation` (`toURL`);
CREATE INDEX `IDX_TYPE` ON `_org_makumba_devel_relations_relation` (`type`);