 );
 
 
-CREATE INDEX nodeid_idx                   on RudderSysEvents (nodeId);
-CREATE INDEX executionTimeStamp_idx       on RudderSysEvents (executionTimeStamp);
-CREATE INDEX composite_node_execution_idx on RudderSysEvents (nodeId, executionTimeStamp);
-CREATE INDEX component_idx                on RudderSysEvents (component);
-CREATE INDEX keyValue_idx                 on RudderSysEvents (keyValue);
-CREATE INDEX ruleId_idx                   on RudderSysEvents (ruleId);
+CREATE INDEX nodeid_idx                   ON RudderSysEvents (nodeId);
+CREATE INDEX executionTimeStamp_idx       ON RudderSysEvents (executionTimeStamp);
+CREATE INDEX composite_node_execution_idx ON RudderSysEvents (nodeId, executionTimeStamp);
+CREATE INDEX component_idx                ON RudderSysEvents (component);
+CREATE INDEX keyValue_idx                 ON RudderSysEvents (keyValue);
+CREATE INDEX ruleId_idx                   ON RudderSysEvents (ruleId);
 
 /*
  * The table used to store archived agent execution reports. 

, PRIMARY KEY(rulePkeyId, directiveId)
);

CREATE INDEX rule_id_start on Rules (ruleId, startTime);
CREATE INDEX rule_end on Rules (endTime);

CREATE sequence NodesId START 101;

CREATE TABLE Nodes (
  id              integer PRIMARY KEY default nextval('NodesId')

 * That table is used when a migration between 
 * event log format is needed. 
 */
CREATE SEQUENCE MigrationEventLogId start 1;
CREATE TABLE MigrationEventLog (
  id                  integer PRIMARY KEY default(nextval('MigrationEventLogId'))
, detectionTime       timestamp with time zone NOT NULL
