text: ;             
  CREATE USER IF NOT EXISTS SA SALT '384245b586a89f30' HASH 'b577b288bb96ec00898dbd3df8dead420a9e5650eaed0a6eb43499d031bd529b' ADMIN;           
  CREATE SEQUENCE PUBLIC.TC_DEVICES_ID_SEQ START WITH 1;        
  CREATE SEQUENCE PUBLIC.TC_POSITIONS_ID_SEQ START WITH 1;      
  CREATE SEQUENCE PUBLIC.TC_DRIVERS_ID_SEQ START WITH 1 INCREMENT BY 50;        
  CREATE SEQUENCE PUBLIC.TC_GROUPS_ID_SEQ START WITH 1 INCREMENT BY 50;         
  CREATE SEQUENCE PUBLIC.TC_EVENTS_ID_SEQ START WITH 1;         
  CREATE SEQUENCE PUBLIC.TC_STATISTICS_ID_SEQ START WITH 1 INCREMENT BY 50;     
  CREATE SEQUENCE PUBLIC.TC_NOTIFICATIONS_ID_SEQ START WITH 1 INCREMENT BY 50;  
  CREATE SEQUENCE PUBLIC.TC_GEOFENCES_ID_SEQ START WITH 1 INCREMENT BY 50;      
  CREATE SEQUENCE PUBLIC.TC_USERS_ID_SEQ START WITH 1 INCREMENT BY 50;          
  CREATE SEQUENCE PUBLIC.TC_COMMANDS_ID_SEQ START WITH 1 INCREMENT BY 50;       
  CREATE SEQUENCE PUBLIC.TC_SERVERS_ID_SEQ START WITH 1 INCREMENT BY 50;        
  CREATE SEQUENCE PUBLIC.TC_ATTRIBUTES_ID_SEQ START WITH 1 INCREMENT BY 50;     
  CREATE SEQUENCE PUBLIC.TC_MAINTENANCES_ID_SEQ START WITH 1 INCREMENT BY 50;   
  CREATE SEQUENCE PUBLIC.TC_CALENDARS_ID_SEQ START WITH 1 INCREMENT BY 50;      
  CREATE CACHED TABLE PUBLIC.TC_ATTRIBUTES(
      ID INT4 NOT NULL,
      ATTRIBUTE VARCHAR(255),
      DESCRIPTION VARCHAR(255),
      EXPRESSION VARCHAR(255),
      TYPE VARCHAR(255)
  );         
  ALTER TABLE PUBLIC.TC_ATTRIBUTES ADD CONSTRAINT PUBLIC.CONSTRAINT_B PRIMARY KEY(ID);          
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_ATTRIBUTES;           
  CREATE CACHED TABLE PUBLIC.TC_CALENDARS(
      ID INT4 NOT NULL,
      ATTRIBUTES VARCHAR(255),
      DATA BYTEA,
      NAME VARCHAR(255)
  );     
  ALTER TABLE PUBLIC.TC_CALENDARS ADD CONSTRAINT PUBLIC.CONSTRAINT_8 PRIMARY KEY(ID);           
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_CALENDARS;            
  CREATE CACHED TABLE PUBLIC.TC_COMMANDS(
      ID INT4 NOT NULL,
      ATTRIBUTES VARCHAR(255),
      DESCRIPTION VARCHAR(255),
      TEXTCHANNEL BOOLEAN,
      TYPE VARCHAR(255)
  );              
  ALTER TABLE PUBLIC.TC_COMMANDS ADD CONSTRAINT PUBLIC.CONSTRAINT_D PRIMARY KEY(ID);            
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_COMMANDS;             
  CREATE CACHED TABLE PUBLIC.TC_DEVICE_ATTRIBUTE(
      DEVICEID INT4 NOT NULL,
      ATTRIBUTEID INT4 NOT NULL
  );               
  ALTER TABLE PUBLIC.TC_DEVICE_ATTRIBUTE ADD CONSTRAINT PUBLIC.CONSTRAINT_5 PRIMARY KEY(DEVICEID, ATTRIBUTEID); 
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_DEVICE_ATTRIBUTE;     
  CREATE CACHED TABLE PUBLIC.TC_DEVICE_COMMAND(
      DEVICEID INT4 NOT NULL,
      COMMANDID INT4 NOT NULL
  );   
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_DEVICE_COMMAND;       
  CREATE CACHED TABLE PUBLIC.TC_DEVICE_DRIVER(
      DRIVERID INT4 NOT NULL,
      DEVICEID INT4 NOT NULL
  );     
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_DEVICE_DRIVER;        
  CREATE CACHED TABLE PUBLIC.TC_DEVICE_GEOFENCE(
      GEOFENCEID INT4 NOT NULL,
      DEVICEID INT4 NOT NULL
  ); 
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_DEVICE_GEOFENCE;      
  CREATE CACHED TABLE PUBLIC.TC_DEVICE_MAINTENANCE(
      MAINTENANCEID INT4 NOT NULL,
      DEVICEID INT4 NOT NULL
  );           
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_DEVICE_MAINTENANCE;   
  CREATE CACHED TABLE PUBLIC.TC_DEVICE_NOTIFICATION(
      NOTIFICATIONID INT4 NOT NULL,
      DEVICEID INT4 NOT NULL
  );         
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_DEVICE_NOTIFICATION;  
  CREATE CACHED TABLE PUBLIC.TC_DEVICES(
      ID INT4 NOT NULL,
      ATTRIBUTESTRING VARCHAR(255),
      CATEGORY VARCHAR(255),
      CONTACT VARCHAR(255),
      DISABLED BOOLEAN,
      LASTUPDATE TIMESTAMP,
      MODEL VARCHAR(255),
      NAME VARCHAR(255),
      PHONE VARCHAR(255),
      POSITIONID INT4,
      UNIQUEID VARCHAR(255),
      GROUPID INT4
  );   
  ALTER TABLE PUBLIC.TC_DEVICES ADD CONSTRAINT PUBLIC.CONSTRAINT_A PRIMARY KEY(ID);             
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_DEVICES;              
  CREATE CACHED TABLE PUBLIC.TC_DRIVERS(
      ID INT4 NOT NULL,
      ATTRIBUTES VARCHAR(255),
      NAME VARCHAR(255),
      UNIQUEID VARCHAR(255)
  );            
  ALTER TABLE PUBLIC.TC_DRIVERS ADD CONSTRAINT PUBLIC.CONSTRAINT_1 PRIMARY KEY(ID);             
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_DRIVERS;              
  CREATE CACHED TABLE PUBLIC.TC_EVENTS(
      ID INT4 NOT NULL,
      ATTRIBUTES VARCHAR(255),
      GEOFENCE BYTEA,
      MAINTENANCEID INT4,
      POSITIONID INT4,
      SERVERTIME TIMESTAMP,
      TYPE VARCHAR(255),
      DEVICEID INT4
  );      
  ALTER TABLE PUBLIC.TC_EVENTS ADD CONSTRAINT PUBLIC.CONSTRAINT_F PRIMARY KEY(ID);              
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_EVENTS;               
  CREATE CACHED TABLE PUBLIC.TC_GEOFENCES(
      ID INT4 NOT NULL,
      AREA VARCHAR(255),
      ATTRIBUTES VARCHAR(255),
      DESCRIPTION VARCHAR(255),
      NAME VARCHAR(255),
      CALENDARID INT4
  );         
  ALTER TABLE PUBLIC.TC_GEOFENCES ADD CONSTRAINT PUBLIC.CONSTRAINT_12 PRIMARY KEY(ID);          
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_GEOFENCES;            
  CREATE CACHED TABLE PUBLIC.TC_GROUP_ATTRIBUTE(
      GROUPID INT4 NOT NULL,
      ATTRIBUTEID INT4 NOT NULL
  ); 
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_GROUP_ATTRIBUTE;      
  CREATE CACHED TABLE PUBLIC.TC_GROUP_COMMAND(
      GROUPID INT4 NOT NULL,
      COMMANDID INT4 NOT NULL
  );     
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_GROUP_COMMAND;        
  CREATE CACHED TABLE PUBLIC.TC_GROUP_DRIVER(
      GROUPID INT4 NOT NULL,
      DRIVERID INT4 NOT NULL
  );       
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_GROUP_DRIVER;         
  CREATE CACHED TABLE PUBLIC.TC_GROUP_GEOFENCE(
      GROUPID INT4 NOT NULL,
      GEOFENCEID INT4 NOT NULL
  );   
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_GROUP_GEOFENCE;       
  CREATE CACHED TABLE PUBLIC.TC_GROUP_MAINTENANCE(
      MAINTENANCEID INT4 NOT NULL,
      GROUPID INT4 NOT NULL
  );             
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_GROUP_MAINTENANCE;    
  CREATE CACHED TABLE PUBLIC.TC_GROUP_NOTIFICATION(
      NOTIFICATIONID INT4 NOT NULL,
      GROUPID INT4 NOT NULL
  );           
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_GROUP_NOTIFICATION;   
  CREATE CACHED TABLE PUBLIC.TC_GROUPS(
      ID INT4 NOT NULL,
      ATTRIBUTESTRING VARCHAR(255),
      NAME VARCHAR(255),
      GROUPID INT4
  ); 
  ALTER TABLE PUBLIC.TC_GROUPS ADD CONSTRAINT PUBLIC.CONSTRAINT_F5 PRIMARY KEY(ID);             
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_GROUPS;               
  CREATE CACHED TABLE PUBLIC.TC_MAINTENANCES(
      ID INT4 NOT NULL,
      ATTRIBUTES VARCHAR(255),
      NAME VARCHAR(255),
      PERIOD FLOAT8 NOT NULL,
      START FLOAT8 NOT NULL,
      TYPE VARCHAR(255)
  );  
  ALTER TABLE PUBLIC.TC_MAINTENANCES ADD CONSTRAINT PUBLIC.CONSTRAINT_F0 PRIMARY KEY(ID);       
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_MAINTENANCES;         
  CREATE CACHED TABLE PUBLIC.TC_NOTIFICATIONS(
      ID INT4 NOT NULL,
      ALWAYS BOOLEAN,
      ATTRIBUTES VARCHAR(255),
      NOTIFICATORS VARCHAR(255),
      TYPE VARCHAR(255),
      CALENDARID INT4
  );       
  ALTER TABLE PUBLIC.TC_NOTIFICATIONS ADD CONSTRAINT PUBLIC.CONSTRAINT_5F PRIMARY KEY(ID);      
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_NOTIFICATIONS;        
  CREATE CACHED TABLE PUBLIC.TC_POSITIONS(
      ID INT4 NOT NULL,
      ACCURACY FLOAT8 NOT NULL,
      ADDRESS VARCHAR(255),
      ALTITUDE FLOAT8 NOT NULL,
      ATTRIBUTES VARCHAR(255),
      COURSE FLOAT8 NOT NULL,
      DEVICETIME TIMESTAMP,
      FIXTIME TIMESTAMP,
      LATITUDE FLOAT8 NOT NULL,
      LONGITUDE FLOAT8 NOT NULL,
      NETWORK VARCHAR(255),
      PROTOCOL VARCHAR(255),
      SERVERTIME TIMESTAMP,
      SPEED FLOAT8 NOT NULL,
      VALID BOOLEAN,
      DEVICEID INT4
  );
  ALTER TABLE PUBLIC.TC_POSITIONS ADD CONSTRAINT PUBLIC.CONSTRAINT_3 PRIMARY KEY(ID);           
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_POSITIONS;            
  CREATE CACHED TABLE PUBLIC.TC_SERVERS(
      ID INT4 NOT NULL,
      ATTRIBUTES VARCHAR(255),
      BINGKEY VARCHAR(255),
      COORDINATEFORMAT VARCHAR(255),
      DEVICEREADONLY BOOLEAN,
      FORCESETTINGS BOOLEAN,
      LATITUDE FLOAT8 NOT NULL,
      LIMITCOMMANDS BOOLEAN,
      LONGITUDE FLOAT8 NOT NULL,
      MAP VARCHAR(255),
      MAPURL VARCHAR(255),
      POILAYER VARCHAR(255),
      READONLY BOOLEAN,
      REGISTRATION BOOLEAN,
      TWELVEHOURFORMAT BOOLEAN,
      ZOOM INT4
  );               
  ALTER TABLE PUBLIC.TC_SERVERS ADD CONSTRAINT PUBLIC.CONSTRAINT_2 PRIMARY KEY(ID);             
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_SERVERS;              
  CREATE CACHED TABLE PUBLIC.TC_STATISTICS(
      ID INT4 NOT NULL,
      ACTIVEDEVICES INT4,
      ACTIVEUSERS INT4,
      ATTRIBUTES VARCHAR(255),
      CAPTURETIME TIMESTAMP,
      GEOCODERREQUESTS INT4,
      GEOLOCATIONREQUESTS INT4,
      MAILSENT INT4,
      MESSAGESRECEIVED INT4,
      MESSAGESSTORED INT4,
      REQUESTS INT4,
      SMSSENT INT4
  );     
  ALTER TABLE PUBLIC.TC_STATISTICS ADD CONSTRAINT PUBLIC.CONSTRAINT_9 PRIMARY KEY(ID);          
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_STATISTICS;           
  CREATE CACHED TABLE PUBLIC.TC_USER_ATTRIBUTE(
      USERID INT4 NOT NULL,
      ATTRIBUTEID INT4 NOT NULL
  );   
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_USER_ATTRIBUTE;       
  CREATE CACHED TABLE PUBLIC.TC_USER_CALENDAR(
      USERID INT4 NOT NULL,
      CALENDARID INT4 NOT NULL
  );     
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_USER_CALENDAR;        
  CREATE CACHED TABLE PUBLIC.TC_USER_COMMAND(
      USERID INT4 NOT NULL,
      COMMANDID INT4 NOT NULL
  );       
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_USER_COMMAND;         
  CREATE CACHED TABLE PUBLIC.TC_USER_DEVICE(
      USERID INT4 NOT NULL,
      DEVICEID INT4 NOT NULL
  );         
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_USER_DEVICE;          
  CREATE CACHED TABLE PUBLIC.TC_USER_DRIVER(
      USERID INT4 NOT NULL,
      DRIVERID INT4 NOT NULL
  );         
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_USER_DRIVER;          
  CREATE CACHED TABLE PUBLIC.TC_USER_GEOFENCE(
      USERID INT4 NOT NULL,
      GEOFENCEID INT4 NOT NULL
  );     
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_USER_GEOFENCE;        
  CREATE CACHED TABLE PUBLIC.TC_USER_GROUP(
      USERID INT4 NOT NULL,
      GROUPID INT4 NOT NULL
  );           
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_USER_GROUP;           
  CREATE CACHED TABLE PUBLIC.TC_USER_MAINTENANCE(
      USERID INT4 NOT NULL,
      MAINTENANCEID INT4 NOT NULL
  );               
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_USER_MAINTENANCE;     
  CREATE CACHED TABLE PUBLIC.TC_USER_NOTIFICATION(
      USERID INT4 NOT NULL,
      NOTIFICATIONID INT4 NOT NULL
  );             
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_USER_NOTIFICATION;    
  CREATE CACHED TABLE PUBLIC.TC_USER_USER(
      USERID INT4 NOT NULL,
      MANAGEDUSERID INT4 NOT NULL
  );      
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_USER_USER;            
  CREATE CACHED TABLE PUBLIC.TC_USERS(
      ID INT4 NOT NULL,
      ADMINISTRATOR BOOLEAN,
      ATTRIBUTESTRING VARCHAR(255),
      COORDINATEFORMAT VARCHAR(255),
      DEVICELIMIT INT4,
      DEVICEREADONLY BOOLEAN,
      DISABLED BOOLEAN,
      EMAIL VARCHAR(255),
      EXPIRATIONTIME TIMESTAMP,
      HASHEDPASSWORD VARCHAR(255),
      LATITUDE FLOAT8 NOT NULL,
      LIMITCOMMANDS BOOLEAN,
      LOGIN VARCHAR(255),
      LONGITUDE FLOAT8 NOT NULL,
      MAP VARCHAR(255),
      NAME VARCHAR(255),
      PHONE VARCHAR(255),
      POILAYER VARCHAR(255),
      READONLY BOOLEAN,
      SALT VARCHAR(255),
      TOKEN VARCHAR(255),
      TWELVEHOURFORMAT BOOLEAN,
      USERLIMIT INT4,
      ZOOM INT4
  );    
  ALTER TABLE PUBLIC.TC_USERS ADD CONSTRAINT PUBLIC.CONSTRAINT_95 PRIMARY KEY(ID);              
  -- 0 +/- SELECT COUNT(*) FROM PUBLIC.TC_USERS;
  ALTER TABLE PUBLIC.TC_DEVICES ADD CONSTRAINT PUBLIC.UKOCBNLMQUH6K10KRARWN1Y1NN9 UNIQUE(UNIQUEID);             
  ALTER TABLE PUBLIC.TC_USER_DEVICE ADD CONSTRAINT PUBLIC.FK2629QA83TEGIEFE06KGANN6AG FOREIGN KEY(USERID) REFERENCES PUBLIC.TC_USERS(ID) NOCHECK;               
  ALTER TABLE PUBLIC.TC_USER_ATTRIBUTE ADD CONSTRAINT PUBLIC.FK5IVIE4JVYEKWG2T0EU8TWIJUU FOREIGN KEY(ATTRIBUTEID) REFERENCES PUBLIC.TC_ATTRIBUTES(ID) NOCHECK;  
  ALTER TABLE PUBLIC.TC_GROUP_GEOFENCE ADD CONSTRAINT PUBLIC.FKB14Y33HCPBA5EAUUJCK65KLDK FOREIGN KEY(GROUPID) REFERENCES PUBLIC.TC_GROUPS(ID) NOCHECK;          
  ALTER TABLE PUBLIC.TC_USER_USER ADD CONSTRAINT PUBLIC.FK90YVBVGY32TPORJT785N64Q3H FOREIGN KEY(MANAGEDUSERID) REFERENCES PUBLIC.TC_USERS(ID) NOCHECK;          
  ALTER TABLE PUBLIC.TC_GROUP_ATTRIBUTE ADD CONSTRAINT PUBLIC.FK9Y0YQXHRHN8IAH5Q0D7WPFID5 FOREIGN KEY(ATTRIBUTEID) REFERENCES PUBLIC.TC_ATTRIBUTES(ID) NOCHECK; 
  ALTER TABLE PUBLIC.TC_DEVICE_DRIVER ADD CONSTRAINT PUBLIC.FKTAIFUA5R0JMUCXR4HJX2WW9V2 FOREIGN KEY(DEVICEID) REFERENCES PUBLIC.TC_DEVICES(ID) NOCHECK;         
  ALTER TABLE PUBLIC.TC_USER_GEOFENCE ADD CONSTRAINT PUBLIC.FK724D2EHB5O39UNFQD9HBQK9X2 FOREIGN KEY(USERID) REFERENCES PUBLIC.TC_USERS(ID) NOCHECK;             
  ALTER TABLE PUBLIC.TC_USER_GROUP ADD CONSTRAINT PUBLIC.FKKF7NNSU7M3F7T1XADFU2E3F1J FOREIGN KEY(GROUPID) REFERENCES PUBLIC.TC_GROUPS(ID) NOCHECK;              
  ALTER TABLE PUBLIC.TC_USER_GEOFENCE ADD CONSTRAINT PUBLIC.FK9XQ7PNPVQ4M31BH04XKSE830Y FOREIGN KEY(GEOFENCEID) REFERENCES PUBLIC.TC_GEOFENCES(ID) NOCHECK;     
  ALTER TABLE PUBLIC.TC_GROUPS ADD CONSTRAINT PUBLIC.FKC77S08CM6YYK63043PENDOVD1 FOREIGN KEY(GROUPID) REFERENCES PUBLIC.TC_GROUPS(ID) NOCHECK;  
  ALTER TABLE PUBLIC.TC_USER_COMMAND ADD CONSTRAINT PUBLIC.FKBUQP4UB7DBV0OGARMAWUUX40R FOREIGN KEY(COMMANDID) REFERENCES PUBLIC.TC_COMMANDS(ID) NOCHECK;        
  ALTER TABLE PUBLIC.TC_DEVICES ADD CONSTRAINT PUBLIC.FKC91QYYU54IOVY2TYJ4W3G5AKT FOREIGN KEY(GROUPID) REFERENCES PUBLIC.TC_GROUPS(ID) NOCHECK; 
  ALTER TABLE PUBLIC.TC_DEVICE_GEOFENCE ADD CONSTRAINT PUBLIC.FKEOJTF7C5WMJ1TWMRYB7V72SEC FOREIGN KEY(GEOFENCEID) REFERENCES PUBLIC.TC_GEOFENCES(ID) NOCHECK;   
  ALTER TABLE PUBLIC.TC_GROUP_MAINTENANCE ADD CONSTRAINT PUBLIC.FKPIVN4RFH8LB7B19HV1ECF5IMU FOREIGN KEY(MAINTENANCEID) REFERENCES PUBLIC.TC_MAINTENANCES(ID) NOCHECK;           
  ALTER TABLE PUBLIC.TC_GEOFENCES ADD CONSTRAINT PUBLIC.FKNH6EK5T9FWT9GQQ39QJNP7A17 FOREIGN KEY(CALENDARID) REFERENCES PUBLIC.TC_CALENDARS(ID) NOCHECK;         
  ALTER TABLE PUBLIC.TC_DEVICE_COMMAND ADD CONSTRAINT PUBLIC.FK1K0TIRV08SY0BPCX4XTAKY87Q FOREIGN KEY(DEVICEID) REFERENCES PUBLIC.TC_DEVICES(ID) NOCHECK;        
  ALTER TABLE PUBLIC.TC_DEVICE_COMMAND ADD CONSTRAINT PUBLIC.FKO9G5R02BD18E308UV23KQ0GNO FOREIGN KEY(COMMANDID) REFERENCES PUBLIC.TC_COMMANDS(ID) NOCHECK;      
  ALTER TABLE PUBLIC.TC_USER_MAINTENANCE ADD CONSTRAINT PUBLIC.FK1PJVEIMROVFX16JPRUGCGXAW9 FOREIGN KEY(USERID) REFERENCES PUBLIC.TC_USERS(ID) NOCHECK;          
  ALTER TABLE PUBLIC.TC_DEVICE_NOTIFICATION ADD CONSTRAINT PUBLIC.FKLRJY6HRMPH5VJL035GWVAKYS FOREIGN KEY(DEVICEID) REFERENCES PUBLIC.TC_DEVICES(ID) NOCHECK;    
  ALTER TABLE PUBLIC.TC_USER_USER ADD CONSTRAINT PUBLIC.FKSWGIDMT0COY70GSAYJHDCID4V FOREIGN KEY(USERID) REFERENCES PUBLIC.TC_USERS(ID) NOCHECK; 
  ALTER TABLE PUBLIC.TC_USER_DEVICE ADD CONSTRAINT PUBLIC.FK2Y4VWWOV4D6SH25MQGUFYPMM0 FOREIGN KEY(DEVICEID) REFERENCES PUBLIC.TC_DEVICES(ID) NOCHECK;           
  ALTER TABLE PUBLIC.TC_USER_CALENDAR ADD CONSTRAINT PUBLIC.FKR3IPSJV2H7ARYFDDSSWSBPD8C FOREIGN KEY(USERID) REFERENCES PUBLIC.TC_USERS(ID) NOCHECK;             
  ALTER TABLE PUBLIC.TC_NOTIFICATIONS ADD CONSTRAINT PUBLIC.FK61R7G8X17BI8I5WDLWVS5MCGX FOREIGN KEY(CALENDARID) REFERENCES PUBLIC.TC_CALENDARS(ID) NOCHECK;     
  ALTER TABLE PUBLIC.TC_GROUP_GEOFENCE ADD CONSTRAINT PUBLIC.FK4GG8316SIN00PSV4TXPWOJ71X FOREIGN KEY(GEOFENCEID) REFERENCES PUBLIC.TC_GEOFENCES(ID) NOCHECK;    
  ALTER TABLE PUBLIC.TC_DEVICE_DRIVER ADD CONSTRAINT PUBLIC.FKHEOAJR1HYCPSJUHWP300YVRF6 FOREIGN KEY(DRIVERID) REFERENCES PUBLIC.TC_DRIVERS(ID) NOCHECK;         
  ALTER TABLE PUBLIC.TC_GROUP_COMMAND ADD CONSTRAINT PUBLIC.FKQB028E01CPXDYKE9B2UCAQGOQ FOREIGN KEY(COMMANDID) REFERENCES PUBLIC.TC_COMMANDS(ID) NOCHECK;       
  ALTER TABLE PUBLIC.TC_DEVICE_GEOFENCE ADD CONSTRAINT PUBLIC.FKQN8RHJXQ5SJ0XF8BQFWGRXGIH FOREIGN KEY(DEVICEID) REFERENCES PUBLIC.TC_DEVICES(ID) NOCHECK;       
  ALTER TABLE PUBLIC.TC_USER_COMMAND ADD CONSTRAINT PUBLIC.FK1PWT04OA5OT8IUAMWBWB2DDR8 FOREIGN KEY(USERID) REFERENCES PUBLIC.TC_USERS(ID) NOCHECK;              
  ALTER TABLE PUBLIC.TC_POSITIONS ADD CONSTRAINT PUBLIC.FKSUMRNJTUMLHOPCJDKGHVY2QSL FOREIGN KEY(DEVICEID) REFERENCES PUBLIC.TC_DEVICES(ID) NOCHECK;             
  ALTER TABLE PUBLIC.TC_GROUP_DRIVER ADD CONSTRAINT PUBLIC.FKCRKFS1NP64F7NE4J3LGCF2J6D FOREIGN KEY(GROUPID) REFERENCES PUBLIC.TC_GROUPS(ID) NOCHECK;            
  ALTER TABLE PUBLIC.TC_DEVICE_MAINTENANCE ADD CONSTRAINT PUBLIC.FKOI90HQ57N537X8ABKQ9B7LK1 FOREIGN KEY(DEVICEID) REFERENCES PUBLIC.TC_DEVICES(ID) NOCHECK;     
  ALTER TABLE PUBLIC.TC_DEVICE_ATTRIBUTE ADD CONSTRAINT PUBLIC.FK2YP7GBCDUTCO78I4IFWXCGIEJ FOREIGN KEY(DEVICEID) REFERENCES PUBLIC.TC_DEVICES(ID) NOCHECK;      
  ALTER TABLE PUBLIC.TC_USER_CALENDAR ADD CONSTRAINT PUBLIC.FK7T5N5K0F7VS240406GU8U89E3 FOREIGN KEY(CALENDARID) REFERENCES PUBLIC.TC_CALENDARS(ID) NOCHECK;     
  ALTER TABLE PUBLIC.TC_DEVICE_NOTIFICATION ADD CONSTRAINT PUBLIC.FKR1BTU10MRVQW937J5UIXF8RBL FOREIGN KEY(NOTIFICATIONID) REFERENCES PUBLIC.TC_NOTIFICATIONS(ID) NOCHECK;       
  ALTER TABLE PUBLIC.TC_EVENTS ADD CONSTRAINT PUBLIC.FK9ROSG4VW6AUWDMP9W7249YNCL FOREIGN KEY(DEVICEID) REFERENCES PUBLIC.TC_DEVICES(ID) NOCHECK;
  ALTER TABLE PUBLIC.TC_GROUP_ATTRIBUTE ADD CONSTRAINT PUBLIC.FK39SAYM3TMU0KBFUOHKC0PMLDV FOREIGN KEY(GROUPID) REFERENCES PUBLIC.TC_GROUPS(ID) NOCHECK;         
  ALTER TABLE PUBLIC.TC_USER_DRIVER ADD CONSTRAINT PUBLIC.FK5D95627GMHCONIFRHCM4JSY59 FOREIGN KEY(USERID) REFERENCES PUBLIC.TC_USERS(ID) NOCHECK;               
  ALTER TABLE PUBLIC.TC_USER_GROUP ADD CONSTRAINT PUBLIC.FKEPFCEUU4C19XVUQYRG652M5R9 FOREIGN KEY(USERID) REFERENCES PUBLIC.TC_USERS(ID) NOCHECK;
  ALTER TABLE PUBLIC.TC_USER_DRIVER ADD CONSTRAINT PUBLIC.FKOIXSOH6OVJONHCRWOBGFMSSUX FOREIGN KEY(DRIVERID) REFERENCES PUBLIC.TC_DRIVERS(ID) NOCHECK;           
  ALTER TABLE PUBLIC.TC_USER_NOTIFICATION ADD CONSTRAINT PUBLIC.FK9KUDIFRW37A5O5UQ75C4FIJBR FOREIGN KEY(USERID) REFERENCES PUBLIC.TC_USERS(ID) NOCHECK;         
  ALTER TABLE PUBLIC.TC_DEVICE_ATTRIBUTE ADD CONSTRAINT PUBLIC.FKGUWGKKU5XOUWWI5UW8U3FMXBS FOREIGN KEY(ATTRIBUTEID) REFERENCES PUBLIC.TC_ATTRIBUTES(ID) NOCHECK;
  ALTER TABLE PUBLIC.TC_GROUP_COMMAND ADD CONSTRAINT PUBLIC.FK264P600OBJN7KKVXT83DUN5YA FOREIGN KEY(GROUPID) REFERENCES PUBLIC.TC_GROUPS(ID) NOCHECK;           
  ALTER TABLE PUBLIC.TC_USER_ATTRIBUTE ADD CONSTRAINT PUBLIC.FKI85BG25400Q3KUWGUGWWPQYR7 FOREIGN KEY(USERID) REFERENCES PUBLIC.TC_USERS(ID) NOCHECK;            
  ALTER TABLE PUBLIC.TC_GROUP_NOTIFICATION ADD CONSTRAINT PUBLIC.FK951TMV3RD1L0Y7SI7WV4KIW1R FOREIGN KEY(NOTIFICATIONID) REFERENCES PUBLIC.TC_NOTIFICATIONS(ID) NOCHECK;        
  ALTER TABLE PUBLIC.TC_DEVICE_MAINTENANCE ADD CONSTRAINT PUBLIC.FKI9LXHQMXQJWRGGO1U1UQNCJDL FOREIGN KEY(MAINTENANCEID) REFERENCES PUBLIC.TC_MAINTENANCES(ID) NOCHECK;          
  ALTER TABLE PUBLIC.TC_GROUP_MAINTENANCE ADD CONSTRAINT PUBLIC.FK9WKPHLLVF8OM9GJBER2H3VRF2 FOREIGN KEY(GROUPID) REFERENCES PUBLIC.TC_GROUPS(ID) NOCHECK;       
  ALTER TABLE PUBLIC.TC_USER_MAINTENANCE ADD CONSTRAINT PUBLIC.FK5NOMC7VEJSROH8H0UJTO2CIAT FOREIGN KEY(MAINTENANCEID) REFERENCES PUBLIC.TC_MAINTENANCES(ID) NOCHECK;            
  ALTER TABLE PUBLIC.TC_GROUP_DRIVER ADD CONSTRAINT PUBLIC.FK40EM4JBPCQF2QJCSI2L5S4HU0 FOREIGN KEY(DRIVERID) REFERENCES PUBLIC.TC_DRIVERS(ID) NOCHECK;          
  ALTER TABLE PUBLIC.TC_GROUP_NOTIFICATION ADD CONSTRAINT PUBLIC.FK59QCV63JFNNLTE0YQ15Q345DP FOREIGN KEY(GROUPID) REFERENCES PUBLIC.TC_GROUPS(ID) NOCHECK;      
  ALTER TABLE PUBLIC.TC_USER_NOTIFICATION ADD CONSTRAINT PUBLIC.FK8SLY6C8TCWDO9KT6MATH7H27Q FOREIGN KEY(NOTIFICATIONID) REFERENCES PUBLIC.TC_NOTIFICATIONS(ID) NOCHECK;         
  