--
-- Host: localhost    Database: tender1_demo
-- ------------------------------------------------------


--
-- Current Database: `tender1_demo`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `tender1_demo` /*!40100 DEFAULT CHARACTER SET latin1 */;

USE `tender1_demo`;

--
-- Table structure for table `accountsdata`
--

CREATE TABLE `accountsdata` (
  `EMBEDDED_ID` bigint(20) NOT NULL,
  `DTYPE` varchar(31) DEFAULT NULL,
  `ACCOUNTS_ACCOUNTSDATA_EMBEDD_0` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`EMBEDDED_ID`),
  KEY `FK_ACCOUNTSDATA_ACCOUNTS_ACCOUNTSDATA_EMBEDD_0` (`ACCOUNTS_ACCOUNTSDATA_EMBEDD_0`),
  CONSTRAINT `FK_ACCOUNTSDATA_ACCOUNTS_ACCOUNTSDATA_EMBEDD_0` FOREIGN KEY (`ACCOUNTS_ACCOUNTSDATA_EMBEDD_0`) REFERENCES `secrets` (`EMBEDDED_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `accountsdata`
--

INSERT INTO `accountsdata` VALUES (2,'AccountsData',3);

--
-- Table structure for table `attributes`
--

CREATE TABLE `attributes` (
  `EMBEDDED_ID` bigint(20) NOT NULL,
  `DTYPE` varchar(31) DEFAULT NULL,
  PRIMARY KEY (`EMBEDDED_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `attributes`
--


--
-- Table structure for table `attributes_entryvalue`
--

CREATE TABLE `attributes_entryvalue` (
  `CustomAttributeMap_EMBEDDED_ID` bigint(20) NOT NULL,
  `attributes_EMBEDDED_ID` bigint(20) NOT NULL,
  `STRING` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`CustomAttributeMap_EMBEDDED_ID`,`attributes_EMBEDDED_ID`),
  KEY `FK_ATTRIBUTES_ENTRYVALUE_attributes_EMBEDDED_ID` (`attributes_EMBEDDED_ID`),
  CONSTRAINT `ATTRIBUTESENTRYVALUECustomAttributeMap_EMBEDDED_ID` FOREIGN KEY (`CustomAttributeMap_EMBEDDED_ID`) REFERENCES `attributes` (`EMBEDDED_ID`),
  CONSTRAINT `FK_ATTRIBUTES_ENTRYVALUE_attributes_EMBEDDED_ID` FOREIGN KEY (`attributes_EMBEDDED_ID`) REFERENCES `entryvalue` (`EMBEDDED_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `attributes_entryvalue`
--


--
-- Table structure for table `clinicalcondition`
--

CREATE TABLE `clinicalcondition` (
  `EMBEDDED_ID` bigint(20) NOT NULL,
  `DTYPE` varchar(31) DEFAULT NULL,
  `DESCRIPTION` varchar(4096) DEFAULT NULL,
  `ID` bigint(20) DEFAULT NULL,
  `VALUE_` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`EMBEDDED_ID`),
  UNIQUE KEY `VALUE_` (`VALUE_`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `clinicalcondition`
--

INSERT INTO `clinicalcondition` VALUES (15,'ClinicalCondition','COPD',9133742142440,'COPD'),(16,'ClinicalCondition','STROKE',9148778185256,'STROKE'),(17,'ClinicalCondition','DEMENTIA',9163785294840,'DEMENTIA');

--
-- Table structure for table `entryvalue`
--

CREATE TABLE `entryvalue` (
  `EMBEDDED_ID` bigint(20) NOT NULL,
  `DTYPE` varchar(31) DEFAULT NULL,
  `DESCRIPTOR_` varchar(4096) DEFAULT NULL,
  `VALUE_` varchar(4096) DEFAULT NULL,
  PRIMARY KEY (`EMBEDDED_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `entryvalue`
--


--
-- Table structure for table `event`
--

CREATE TABLE `event` (
  `EMBEDDED_ID` bigint(20) NOT NULL,
  `DTYPE` varchar(31) DEFAULT NULL,
  `DATA_` longblob,
  `ENDTIME` varchar(255) DEFAULT NULL,
  `END_MILLIS` bigint(20) DEFAULT NULL,
  `ID` bigint(20) DEFAULT NULL,
  `LABEL` varchar(255) DEFAULT NULL,
  `STARTTIME` varchar(255) DEFAULT NULL,
  `START_MILLIS` bigint(20) DEFAULT NULL,
  `TYPE_` varchar(255) DEFAULT NULL,
  `ATTRIBUTES__EVENT_EMBEDDED_ID` bigint(20) DEFAULT NULL,
  `EVENTS_EVENTS_EMBEDDED_ID` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`EMBEDDED_ID`),
  KEY `FK_EVENT_EVENTS_EVENTS_EMBEDDED_ID` (`EVENTS_EVENTS_EMBEDDED_ID`),
  KEY `FK_EVENT_ATTRIBUTES__EVENT_EMBEDDED_ID` (`ATTRIBUTES__EVENT_EMBEDDED_ID`),
  CONSTRAINT `FK_EVENT_ATTRIBUTES__EVENT_EMBEDDED_ID` FOREIGN KEY (`ATTRIBUTES__EVENT_EMBEDDED_ID`) REFERENCES `attributes` (`EMBEDDED_ID`),
  CONSTRAINT `FK_EVENT_EVENTS_EVENTS_EMBEDDED_ID` FOREIGN KEY (`EVENTS_EVENTS_EMBEDDED_ID`) REFERENCES `events` (`EMBEDDED_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `event`
--


--
-- Table structure for table `events`
--

CREATE TABLE `events` (
  `EMBEDDED_ID` bigint(20) NOT NULL,
  `DTYPE` varchar(31) DEFAULT NULL,
  PRIMARY KEY (`EMBEDDED_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `events`
--

INSERT INTO `events` VALUES (4,'Events');

--
-- Table structure for table `goal`
--

CREATE TABLE `goal` (
  `EMBEDDED_ID` bigint(20) NOT NULL,
  `DTYPE` varchar(31) DEFAULT NULL,
  `ADDITIONALINFO` varchar(255) DEFAULT NULL,
  `DESCRIPTION` varchar(255) DEFAULT NULL,
  `ENDDATE` varchar(255) DEFAULT NULL,
  `END_MILLIS` bigint(20) DEFAULT NULL,
  `GOALTYPE` varchar(255) DEFAULT NULL,
  `ID` bigint(20) DEFAULT NULL,
  `IMPORTANCE` varchar(255) DEFAULT NULL,
  `INITIALMEASUREMENT` varchar(255) DEFAULT NULL,
  `MEASUREMENTUNIT` varchar(255) DEFAULT NULL,
  `NAME_` varchar(255) DEFAULT NULL,
  `NOTIFICATIONFREQUENCY` varchar(255) DEFAULT NULL,
  `OPERATOR_` varchar(255) DEFAULT NULL,
  `PROGRESS` varchar(255) DEFAULT NULL,
  `REMINDERCATEGORY` varchar(255) DEFAULT NULL,
  `STARTDATE` varchar(255) DEFAULT NULL,
  `START_MILLIS` bigint(20) DEFAULT NULL,
  `STATUS` varchar(255) DEFAULT NULL,
  `TARGETMEASUREMENT` varchar(255) DEFAULT NULL,
  `TYPE_` varchar(255) DEFAULT NULL,
  `ATTRIBUTES__GOAL_EMBEDDED_ID` bigint(20) DEFAULT NULL,
  `CONDITION_GOAL_EMBEDDED_ID` bigint(20) DEFAULT NULL,
  `SUBGOALS_GOAL_EMBEDDED_ID` bigint(20) DEFAULT NULL,
  `GOALS_GOALS_EMBEDDED_ID` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`EMBEDDED_ID`),
  KEY `FK_GOAL_CONDITION_GOAL_EMBEDDED_ID` (`CONDITION_GOAL_EMBEDDED_ID`),
  KEY `FK_GOAL_GOALS_GOALS_EMBEDDED_ID` (`GOALS_GOALS_EMBEDDED_ID`),
  KEY `FK_GOAL_SUBGOALS_GOAL_EMBEDDED_ID` (`SUBGOALS_GOAL_EMBEDDED_ID`),
  KEY `FK_GOAL_ATTRIBUTES__GOAL_EMBEDDED_ID` (`ATTRIBUTES__GOAL_EMBEDDED_ID`),
  CONSTRAINT `FK_GOAL_ATTRIBUTES__GOAL_EMBEDDED_ID` FOREIGN KEY (`ATTRIBUTES__GOAL_EMBEDDED_ID`) REFERENCES `attributes` (`EMBEDDED_ID`),
  CONSTRAINT `FK_GOAL_CONDITION_GOAL_EMBEDDED_ID` FOREIGN KEY (`CONDITION_GOAL_EMBEDDED_ID`) REFERENCES `clinicalcondition` (`EMBEDDED_ID`),
  CONSTRAINT `FK_GOAL_GOALS_GOALS_EMBEDDED_ID` FOREIGN KEY (`GOALS_GOALS_EMBEDDED_ID`) REFERENCES `goals` (`EMBEDDED_ID`),
  CONSTRAINT `FK_GOAL_SUBGOALS_GOAL_EMBEDDED_ID` FOREIGN KEY (`SUBGOALS_GOAL_EMBEDDED_ID`) REFERENCES `goal` (`EMBEDDED_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `goal`
--


--
-- Table structure for table `goals`
--

CREATE TABLE `goals` (
  `EMBEDDED_ID` bigint(20) NOT NULL,
  `DTYPE` varchar(31) DEFAULT NULL,
  PRIMARY KEY (`EMBEDDED_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `goals`
--

INSERT INTO `goals` VALUES (5,'Goals');

--
-- Table structure for table `personaldata`
--

CREATE TABLE `personaldata` (
  `EMBEDDED_ID` bigint(20) NOT NULL,
  `DTYPE` varchar(31) DEFAULT NULL,
  `DATEOFBIRTH` varchar(255) DEFAULT NULL,
  `FIRSTNAME` varchar(255) DEFAULT NULL,
  `LASTNAME` varchar(255) DEFAULT NULL,
  `USERNAME` varchar(255) DEFAULT NULL,
  `CONDITION_PERSONALDATA_EMBED_0` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`EMBEDDED_ID`),
  KEY `FK_PERSONALDATA_CONDITION_PERSONALDATA_EMBED_0` (`CONDITION_PERSONALDATA_EMBED_0`),
  CONSTRAINT `FK_PERSONALDATA_CONDITION_PERSONALDATA_EMBED_0` FOREIGN KEY (`CONDITION_PERSONALDATA_EMBED_0`) REFERENCES `clinicalcondition` (`EMBEDDED_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `personaldata`
--

INSERT INTO `personaldata` VALUES (6,'PersonalData',NULL,'Admin','Admin','a@a.it',NULL);

--
-- Table structure for table `reminder`
--

CREATE TABLE `reminder` (
  `EMBEDDED_ID` bigint(20) NOT NULL,
  `DTYPE` varchar(31) DEFAULT NULL,
  `DESCRIPTION` varchar(255) DEFAULT NULL,
  `ENDDATE` varchar(255) DEFAULT NULL,
  `FREQUENCY` varchar(255) DEFAULT NULL,
  `ID` bigint(20) DEFAULT NULL,
  `STARTDATE` varchar(255) DEFAULT NULL,
  `TEXT` varchar(4096) DEFAULT NULL,
  `CONDITION_REMINDER_EMBEDDED__0` bigint(20) DEFAULT NULL,
  `REMINDERS_REMINDERS_EMBEDDED_0` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`EMBEDDED_ID`),
  KEY `FK_REMINDER_CONDITION_REMINDER_EMBEDDED__0` (`CONDITION_REMINDER_EMBEDDED__0`),
  KEY `FK_REMINDER_REMINDERS_REMINDERS_EMBEDDED_0` (`REMINDERS_REMINDERS_EMBEDDED_0`),
  CONSTRAINT `FK_REMINDER_REMINDERS_REMINDERS_EMBEDDED_0` FOREIGN KEY (`REMINDERS_REMINDERS_EMBEDDED_0`) REFERENCES `reminders` (`EMBEDDED_ID`),
  CONSTRAINT `FK_REMINDER_CONDITION_REMINDER_EMBEDDED__0` FOREIGN KEY (`CONDITION_REMINDER_EMBEDDED__0`) REFERENCES `clinicalcondition` (`EMBEDDED_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `reminder`
--


--
-- Table structure for table `reminders`
--

CREATE TABLE `reminders` (
  `EMBEDDED_ID` bigint(20) NOT NULL,
  `DTYPE` varchar(31) DEFAULT NULL,
  PRIMARY KEY (`EMBEDDED_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `reminders`
--

INSERT INTO `reminders` VALUES (7,'Reminders'),(13,'Reminders');

--
-- Table structure for table `report`
--

CREATE TABLE `report` (
  `EMBEDDED_ID` bigint(20) NOT NULL,
  `DTYPE` varchar(31) DEFAULT NULL,
  `DATE_` varchar(255) DEFAULT NULL,
  `DESCRIPTION` varchar(255) DEFAULT NULL,
  `ID` bigint(20) DEFAULT NULL,
  `REPORTS_REPORTS_EMBEDDED_ID` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`EMBEDDED_ID`),
  KEY `FK_REPORT_REPORTS_REPORTS_EMBEDDED_ID` (`REPORTS_REPORTS_EMBEDDED_ID`),
  CONSTRAINT `FK_REPORT_REPORTS_REPORTS_EMBEDDED_ID` FOREIGN KEY (`REPORTS_REPORTS_EMBEDDED_ID`) REFERENCES `reports` (`EMBEDDED_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `report`
--


--
-- Table structure for table `reports`
--

CREATE TABLE `reports` (
  `EMBEDDED_ID` bigint(20) NOT NULL,
  `DTYPE` varchar(31) DEFAULT NULL,
  PRIMARY KEY (`EMBEDDED_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `reports`
--

INSERT INTO `reports` VALUES (8,'Reports'),(14,'Reports');

--
-- Table structure for table `secretvalue`
--

CREATE TABLE `secretvalue` (
  `EMBEDDED_ID` bigint(20) NOT NULL,
  `DTYPE` varchar(31) DEFAULT NULL,
  `DESCRIPTOR_` varchar(4096) DEFAULT NULL,
  `VALUE_` varchar(4096) DEFAULT NULL,
  PRIMARY KEY (`EMBEDDED_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `secretvalue`
--


--
-- Table structure for table `sequence`
--

CREATE TABLE `sequence` (
  `SEQ_NAME` varchar(50) NOT NULL,
  `SEQ_COUNT` decimal(38,0) DEFAULT NULL,
  PRIMARY KEY (`SEQ_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `sequence`
--

INSERT INTO `sequence` VALUES ('SEQ_GEN',50);

--
-- Table structure for table `session_`
--

CREATE TABLE `session_` (
  `EMBEDDED_ID` bigint(20) NOT NULL,
  `DTYPE` varchar(31) DEFAULT NULL,
  `DESCRIPTION` varchar(255) DEFAULT NULL,
  `ENDTIME` varchar(255) DEFAULT NULL,
  `END_MILLIS` bigint(20) DEFAULT NULL,
  `ID` bigint(20) DEFAULT NULL,
  `STARTTIME` varchar(255) DEFAULT NULL,
  `START_MILLIS` bigint(20) DEFAULT NULL,
  `METADATA_SESSION__EMBEDDED_ID` bigint(20) DEFAULT NULL,
  `SESSIONS_SESSIONS_EMBEDDED_ID` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`EMBEDDED_ID`),
  KEY `FK_SESSION__SESSIONS_SESSIONS_EMBEDDED_ID` (`SESSIONS_SESSIONS_EMBEDDED_ID`),
  KEY `FK_SESSION__METADATA_SESSION__EMBEDDED_ID` (`METADATA_SESSION__EMBEDDED_ID`),
  CONSTRAINT `FK_SESSION__METADATA_SESSION__EMBEDDED_ID` FOREIGN KEY (`METADATA_SESSION__EMBEDDED_ID`) REFERENCES `sessionmetadata` (`EMBEDDED_ID`),
  CONSTRAINT `FK_SESSION__SESSIONS_SESSIONS_EMBEDDED_ID` FOREIGN KEY (`SESSIONS_SESSIONS_EMBEDDED_ID`) REFERENCES `sessions` (`EMBEDDED_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `session_`
--


--
-- Table structure for table `sessionmetadata`
--

CREATE TABLE `sessionmetadata` (
  `EMBEDDED_ID` bigint(20) NOT NULL,
  `DTYPE` varchar(31) DEFAULT NULL,
  `ID` bigint(20) DEFAULT NULL,
  `ATTRIBUTES__SESSIONMETADATA__0` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`EMBEDDED_ID`),
  KEY `FK_SESSIONMETADATA_ATTRIBUTES__SESSIONMETADATA__0` (`ATTRIBUTES__SESSIONMETADATA__0`),
  CONSTRAINT `FK_SESSIONMETADATA_ATTRIBUTES__SESSIONMETADATA__0` FOREIGN KEY (`ATTRIBUTES__SESSIONMETADATA__0`) REFERENCES `attributes` (`EMBEDDED_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `sessionmetadata`
--


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `EMBEDDED_ID` bigint(20) NOT NULL,
  `DTYPE` varchar(31) DEFAULT NULL,
  PRIMARY KEY (`EMBEDDED_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `sessions`
--

INSERT INTO `sessions` VALUES (9,'Sessions');

--
-- Table structure for table `settingsdata`
--

CREATE TABLE `settingsdata` (
  `EMBEDDED_ID` bigint(20) NOT NULL,
  `DTYPE` varchar(31) DEFAULT NULL,
  `SETTINGS_SETTINGSDATA_EMBEDD_0` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`EMBEDDED_ID`),
  KEY `FK_SETTINGSDATA_SETTINGS_SETTINGSDATA_EMBEDD_0` (`SETTINGS_SETTINGSDATA_EMBEDD_0`),
  CONSTRAINT `FK_SETTINGSDATA_SETTINGS_SETTINGSDATA_EMBEDD_0` FOREIGN KEY (`SETTINGS_SETTINGSDATA_EMBEDD_0`) REFERENCES `secrets` (`EMBEDDED_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `settingsdata`
--

INSERT INTO `settingsdata` VALUES (10,'SettingsData',11);

--
-- Table structure for table `user_`
--

CREATE TABLE `user_` (
  `EMBEDDED_ID` bigint(20) NOT NULL,
  `DTYPE` varchar(31) DEFAULT NULL,
  `ID` bigint(20) DEFAULT NULL,
  `ACCOUNTS_USER__EMBEDDED_ID` bigint(20) DEFAULT NULL,
  `EVENTS_USER__EMBEDDED_ID` bigint(20) DEFAULT NULL,
  `GOALS_USER__EMBEDDED_ID` bigint(20) DEFAULT NULL,
  `PERSONALDATA_USER__EMBEDDED__0` bigint(20) DEFAULT NULL,
  `REMINDERS_USER__EMBEDDED_ID` bigint(20) DEFAULT NULL,
  `REPORTS_USER__EMBEDDED_ID` bigint(20) DEFAULT NULL,
  `SESSIONS_USER__EMBEDDED_ID` bigint(20) DEFAULT NULL,
  `SETTINGS_USER__EMBEDDED_ID` bigint(20) DEFAULT NULL,
  `USERS_USERS_EMBEDDED_ID` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`EMBEDDED_ID`),
  KEY `FK_USER__PERSONALDATA_USER__EMBEDDED__0` (`PERSONALDATA_USER__EMBEDDED__0`),
  KEY `FK_USER__EVENTS_USER__EMBEDDED_ID` (`EVENTS_USER__EMBEDDED_ID`),
  KEY `FK_USER__SETTINGS_USER__EMBEDDED_ID` (`SETTINGS_USER__EMBEDDED_ID`),
  KEY `FK_USER__USERS_USERS_EMBEDDED_ID` (`USERS_USERS_EMBEDDED_ID`),
  KEY `FK_USER__REPORTS_USER__EMBEDDED_ID` (`REPORTS_USER__EMBEDDED_ID`),
  KEY `FK_USER__GOALS_USER__EMBEDDED_ID` (`GOALS_USER__EMBEDDED_ID`),
  KEY `FK_USER__SESSIONS_USER__EMBEDDED_ID` (`SESSIONS_USER__EMBEDDED_ID`),
  KEY `FK_USER__REMINDERS_USER__EMBEDDED_ID` (`REMINDERS_USER__EMBEDDED_ID`),
  KEY `FK_USER__ACCOUNTS_USER__EMBEDDED_ID` (`ACCOUNTS_USER__EMBEDDED_ID`),
  CONSTRAINT `FK_USER__ACCOUNTS_USER__EMBEDDED_ID` FOREIGN KEY (`ACCOUNTS_USER__EMBEDDED_ID`) REFERENCES `accountsdata` (`EMBEDDED_ID`),
  CONSTRAINT `FK_USER__EVENTS_USER__EMBEDDED_ID` FOREIGN KEY (`EVENTS_USER__EMBEDDED_ID`) REFERENCES `events` (`EMBEDDED_ID`),
  CONSTRAINT `FK_USER__GOALS_USER__EMBEDDED_ID` FOREIGN KEY (`GOALS_USER__EMBEDDED_ID`) REFERENCES `goals` (`EMBEDDED_ID`),
  CONSTRAINT `FK_USER__PERSONALDATA_USER__EMBEDDED__0` FOREIGN KEY (`PERSONALDATA_USER__EMBEDDED__0`) REFERENCES `personaldata` (`EMBEDDED_ID`),
  CONSTRAINT `FK_USER__REMINDERS_USER__EMBEDDED_ID` FOREIGN KEY (`REMINDERS_USER__EMBEDDED_ID`) REFERENCES `reminders` (`EMBEDDED_ID`),
  CONSTRAINT `FK_USER__REPORTS_USER__EMBEDDED_ID` FOREIGN KEY (`REPORTS_USER__EMBEDDED_ID`) REFERENCES `reports` (`EMBEDDED_ID`),
  CONSTRAINT `FK_USER__SESSIONS_USER__EMBEDDED_ID` FOREIGN KEY (`SESSIONS_USER__EMBEDDED_ID`) REFERENCES `sessions` (`EMBEDDED_ID`),
  CONSTRAINT `FK_USER__SETTINGS_USER__EMBEDDED_ID` FOREIGN KEY (`SETTINGS_USER__EMBEDDED_ID`) REFERENCES `settingsdata` (`EMBEDDED_ID`),
  CONSTRAINT `FK_USER__USERS_USERS_EMBEDDED_ID` FOREIGN KEY (`USERS_USERS_EMBEDDED_ID`) REFERENCES `users` (`EMBEDDED_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `user_`
--

INSERT INTO `user_` VALUES (1,'User',8959744230846,NULL,4,5,6,13,14,9,NULL,NULL);

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `EMBEDDED_ID` bigint(20) NOT NULL,
  `DTYPE` varchar(31) DEFAULT NULL,
  PRIMARY KEY (`EMBEDDED_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `users`
--



