 
 CREATE DATABASE IF NOT EXISTS reportwriter;
 USE reportwriter;
+
+--
+-- Definition of table `user`
+--
+
+DROP TABLE IF EXISTS `user`;
+CREATE TABLE `user` (
+  `ID` bigint(20) NOT NULL,
+  `LOGIN_NAME` varchar(100) NOT NULL,
+  PRIMARY KEY  (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `user`
+--
+
+/*!40000 ALTER TABLE `user` DISABLE KEYS */;
+INSERT INTO `user` (`ID`,`LOGIN_NAME`) VALUES
+ (101,'kimong');
+
+
+ --
+-- Definition of table `hi_value`
+--
+
+DROP TABLE IF EXISTS `hi_value`;
+CREATE TABLE `hi_value` (
+  `next_value` int(10) unsigned NOT NULL auto_increment,
+  PRIMARY KEY  (`next_value`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `hi_value`
+--
+
+/*!40000 ALTER TABLE `hi_value` DISABLE KEYS */;
+INSERT INTO `hi_value` (`next_value`) VALUES
+ (68);
+/*!40000 ALTER TABLE `hi_value` ENABLE KEYS */;
+
+
 
 --
 -- Definition of table `customized_query`

-- Dumping data for table `customized_query`
--

/*!40000 ALTER TABLE `customized_query` DISABLE KEYS */;
/*!40000 ALTER TABLE `customized_query` ENABLE KEYS */;


--
-- Definition of table `customized_report`
--

DROP TABLE IF EXISTS `customized_report`;
CREATE TABLE `customized_report` (
  `REPORT_ID` int(11) NOT NULL,
  `BASED_ON` int(11) default NULL,
  PRIMARY KEY  (`REPORT_ID`),
  KEY `BASED_ON` (`BASED_ON`),
  KEY `REPORT_ID` (`REPORT_ID`),
  CONSTRAINT `FK_CUSTOMIZED_REPORT_CUSTOMIZED_QUERY` FOREIGN KEY (`BASED_ON`) REFERENCES `customized_query` (`ID`),
  CONSTRAINT `FK_CUSTOMIZED_REPORT_REPORT` FOREIGN KEY (`REPORT_ID`) REFERENCES `report` (`ID`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `customized_report`
--

/*!40000 ALTER TABLE `customized_report` DISABLE KEYS */;
/*!40000 ALTER TABLE `customized_report` ENABLE KEYS */;


--
-- Definition of table `hi_value`
--

DROP TABLE IF EXISTS `hi_value`;
CREATE TABLE `hi_value` (
  `next_value` int(10) unsigned NOT NULL auto_increment,
  PRIMARY KEY  (`next_value`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `hi_value`
--

/*!40000 ALTER TABLE `hi_value` DISABLE KEYS */;
INSERT INTO `hi_value` (`next_value`) VALUES
 (68);
/*!40000 ALTER TABLE `hi_value` ENABLE KEYS */;


--

/*!40000 ALTER TABLE `report_column` ENABLE KEYS */;



--
-- Definition of table `standard_report`
