text: -- MySQL dump 10.13  Distrib 5.1.73, for redhat-linux-gnu (x86_64)
  --
  -- Host: 10.143.129.32    Database: davinci
  -- ------------------------------------------------------
  -- Server version	5.1.73
  
  /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  /*!40101 SET NAMES utf8 */;
  /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  /*!40103 SET TIME_ZONE='+00:00' */;
  /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  
  --
  -- Table structure for table `dashboard`
  --
  
  DROP TABLE IF EXISTS `dashboard`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `dashboard` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `name` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
    `pic` varchar(2000) CHARACTER SET utf8 DEFAULT NULL,
    `desc` varchar(1000) COLLATE utf8_unicode_ci NOT NULL,
    `publish` tinyint(1) NOT NULL,
    `active` tinyint(1) NOT NULL,
    `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `create_by` bigint(20) NOT NULL,
    `update_time` timestamp NOT NULL DEFAULT '1970-01-02 00:00:00',
    `update_by` bigint(20) NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `dashboard`
  --
  
  
  
  --
  -- Table structure for table `flattable`
  --
  
  DROP TABLE IF EXISTS `flattable`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `flattable` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `source_id` bigint(20) DEFAULT NULL,
    `name` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
    `sql_tmpl` varchar(4000) COLLATE utf8_unicode_ci NOT NULL,
    `result_table` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
    `desc` varchar(1000) CHARACTER SET utf8 DEFAULT NULL,
    `trigger_type` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
    `frequency` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL,
    `catch` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL,
    `active` tinyint(1) NOT NULL,
    `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `create_by` bigint(20) NOT NULL,
    `update_time` timestamp NOT NULL DEFAULT '1970-01-02 00:00:00',
    `update_by` bigint(20) NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=58 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `flattable`
  --
  
  
  --
  -- Table structure for table `log_sql`
  --
  
  DROP TABLE IF EXISTS `log_sql`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `log_sql` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `user_id` bigint(20) NOT NULL,
    `user_email` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
    `sqls` varchar(2000) CHARACTER SET utf8 NOT NULL,
    `start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `end_time` timestamp NULL DEFAULT '1970-01-02 00:00:00',
    `success` tinyint(1) DEFAULT NULL,
    `error` varchar(2000) COLLATE utf8_unicode_ci DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `log_sql`
  --
  
  
  
  --
  -- Table structure for table `rel_dashboard_widget`
  --
  
  DROP TABLE IF EXISTS `rel_dashboard_widget`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `rel_dashboard_widget` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `dashboard_id` bigint(20) NOT NULL,
    `widget_id` bigint(20) NOT NULL,
    `position_x` int(11) NOT NULL,
    `position_y` int(11) NOT NULL,
    `length` int(11) NOT NULL,
    `width` int(11) NOT NULL,
    `trigger_type` varchar(200) CHARACTER SET utf8 NOT NULL,
    `trigger_params` varchar(200) CHARACTER SET utf8 NOT NULL,
    `active` tinyint(1) NOT NULL,
    `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `create_by` bigint(20) NOT NULL,
    `update_time` timestamp NOT NULL DEFAULT '1970-01-02 00:00:00',
    `update_by` bigint(20) NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=174 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `rel_dashboard_widget`
  --
  
  
  
  --
  -- Table structure for table `rel_group_flattable`
  --
  
  DROP TABLE IF EXISTS `rel_group_flattable`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `rel_group_flattable` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `group_id` bigint(20) NOT NULL,
    `flattable_id` bigint(20) NOT NULL,
    `sql_params` varchar(2000) CHARACTER SET utf8 DEFAULT NULL,
    `active` tinyint(1) NOT NULL,
    `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `create_by` bigint(20) NOT NULL,
    `update_time` timestamp NOT NULL DEFAULT '1970-01-02 00:00:00',
    `update_by` bigint(20) NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=306 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  
  --
  -- Table structure for table `rel_user_group`
  --
  
  DROP TABLE IF EXISTS `rel_user_group`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `rel_user_group` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `user_id` bigint(20) NOT NULL,
    `group_id` bigint(20) DEFAULT NULL,
    `active` tinyint(1) NOT NULL,
    `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `create_by` bigint(20) NOT NULL,
    `update_time` timestamp NOT NULL DEFAULT '1970-01-02 00:00:00',
    `update_by` bigint(20) NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `rel_user_group`
  --
  
  
  
  --
  -- Table structure for table `share_info`
  --
  
  
  
  --
  -- Table structure for table `source`
  --
  
  DROP TABLE IF EXISTS `source`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `source` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `name` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
    `connection_url` varchar(400) COLLATE utf8_unicode_ci NOT NULL,
    `desc` varchar(1000) CHARACTER SET utf8 NOT NULL,
    `type` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
    `config` varchar(5000) COLLATE utf8_unicode_ci NOT NULL,
    `active` tinyint(1) NOT NULL,
    `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `create_by` bigint(20) NOT NULL,
    `update_time` timestamp NOT NULL DEFAULT '1970-01-02 00:00:00',
    `update_by` bigint(20) NOT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `name_UNIQUE` (`name`)
  ) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `source`
  --
  
  
  
  --
  -- Table structure for table `user`
  --
  
  DROP TABLE IF EXISTS `user`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `user` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `email` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
    `password` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
    `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
    `name` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
    `admin` tinyint(1) NOT NULL,
    `active` tinyint(1) NOT NULL,
    `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `create_by` bigint(20) NOT NULL,
    `update_time` timestamp NOT NULL DEFAULT '1970-01-02 00:00:00',
    `update_by` bigint(20) NOT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `email_UNIQUE` (`email`)
  ) ENGINE=InnoDB AUTO_INCREMENT=342 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `user`
  --
  
  LOCK TABLES `user` WRITE;
  /*!40000 ALTER TABLE `user` DISABLE KEYS */;
  INSERT INTO `user` VALUES (1,'super@davinci.com','123456','super','super',1,1,'2017-08-17 06:32:40',1,'2017-05-22 09:40:30',1);
  /*!40000 ALTER TABLE `user` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `user_group`
  --
  
  DROP TABLE IF EXISTS `user_group`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `user_group` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `name` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
    `desc` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL,
    `active` tinyint(1) NOT NULL,
    `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `create_by` bigint(20) NOT NULL,
    `update_time` timestamp NOT NULL DEFAULT '1970-01-02 00:00:00',
    `update_by` bigint(20) NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `user_group`
  --
  
  
  --
  -- Table structure for table `widget`
  --
  
  DROP TABLE IF EXISTS `widget`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `widget` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `widgetlib_id` bigint(20) NOT NULL,
    `flattable_id` bigint(20) DEFAULT NULL,
    `name` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
    `adhoc_sql` varchar(2000) CHARACTER SET utf8 DEFAULT NULL,
    `desc` varchar(1000) COLLATE utf8_unicode_ci NOT NULL,
    `chart_params` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL,
    `query_params` varchar(1000) COLLATE utf8_unicode_ci DEFAULT '',
    `publish` tinyint(1) NOT NULL,
    `active` tinyint(1) NOT NULL,
    `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `create_by` bigint(20) NOT NULL,
    `update_time` timestamp NOT NULL DEFAULT '1970-01-02 00:00:00',
    `update_by` bigint(20) NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=73 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `widget`
  --
  
  
  
  
  /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  
  /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  
  -- Dump completed on 2017-09-06 15:52:35
  