CREATE TABLE IF NOT EXISTS WORKERS_CONFIGURATION (
WORKERID VARCHAR(255) PRIMARY KEY,
HOST VARCHAR(500),
PORT INT
);

CREATE TABLE IF NOT EXISTS WORKERS_DETAILS (
 CARBONID VARCHAR(255) PRIMARY KEY ,
 WORKERID VARCHAR(255),
 JAVARUNTIMENAME VARCHAR(255),
 JAVAVMVERSION VARCHAR(255),
 JAVAVMVENDOR VARCHAR(255),
 JAVAHOME VARCHAR(255),
 JAVAVERSION VARCHAR(255),
 OSNAME VARCHAR(255),
 OSVERSION VARCHAR(255),
 USERHOME VARCHAR(255),
 USERTIMEZONE VARCHAR(255),
 USERNAME VARCHAR(255),
 USERCOUNTRY VARCHAR(255),
 REPOLOCATION VARCHAR(255),
 SERVERSTARTTIME BIGINT,
 LASTSNAPSHOTTIME BIGINT,
 FOREIGN KEY (WORKERID) REFERENCES WORKERS_CONFIGURATION(WORKERID)
);

CREATE INDEX IDX_WORKERID ON WORKERS_CONFIGURATION (WORKERID);
CREATE INDEX IDX_WORKERID ON WORKERS_DETAILS (WORKERID);
