Advertisement
adewaleA4

Untitled

Mar 19th, 2015
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 18.27 KB | None | 0 0
  1. -- MySQL dump 10.13  Distrib 5.5.37, for debian-linux-gnu (x86_64)
  2. --
  3. -- Host: localhost    Database: bomcloud
  4. -- ------------------------------------------------------
  5. -- Server version   5.5.37-0ubuntu0.14.04.1
  6.  
  7. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  8. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  9. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  10. /*!40101 SET NAMES utf8 */;
  11. /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  12. /*!40103 SET TIME_ZONE='+00:00' */;
  13. /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  14. /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  15. /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  16. /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  17.  
  18. --
  19. -- Table structure for table `account_opening`
  20. --
  21. USE bomcloud;
  22. DROP TABLE IF EXISTS `account_opening`;
  23. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  24. /*!40101 SET character_set_client = utf8 */;
  25. CREATE TABLE `account_opening` (
  26.   `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
  27.   `request_date` datetime DEFAULT NULL,
  28.   `location` VARCHAR(255) DEFAULT NULL,
  29.   `first_name` VARCHAR(255) DEFAULT NULL,
  30.   `last_name` VARCHAR(255) DEFAULT NULL,
  31.   `middle_name` VARCHAR(255) DEFAULT NULL,
  32.   `address` VARCHAR(255) DEFAULT NULL,
  33.   `email` VARCHAR(255) DEFAULT NULL,
  34.   `gender` VARCHAR(255) DEFAULT NULL,
  35.   `salutation` VARCHAR(255) DEFAULT NULL,
  36.   `phone_number` VARCHAR(255) DEFAULT NULL,
  37.   `date_of_birth` datetime DEFAULT NULL,
  38.   `response_code` VARCHAR(255) DEFAULT NULL,
  39.   `response_message` VARCHAR(255) DEFAULT NULL,
  40.   `is_offline` tinyint(1) DEFAULT '0',
  41.   `response_date` datetime DEFAULT NULL,
  42.   `dsa_id` BIGINT(20) DEFAULT NULL,
  43.   `device_id` BIGINT(20) DEFAULT NULL,
  44.   `financial_institution_id` BIGINT(20) DEFAULT NULL,
  45.   PRIMARY KEY (`id`),
  46.   KEY `ix_account_opening_dsa_1` (`dsa_id`),
  47.   KEY `ix_account_opening_device_2` (`device_id`),
  48.   KEY `ix_account_opening_financialInstitution_3` (`financial_institution_id`),
  49.   CONSTRAINT `fk_account_opening_device_2` FOREIGN KEY (`device_id`) REFERENCES `device` (`id`),
  50.   CONSTRAINT `fk_account_opening_dsa_1` FOREIGN KEY (`dsa_id`) REFERENCES `dsa` (`id`),
  51.   CONSTRAINT `fk_account_opening_financialInstitution_3` FOREIGN KEY (`financial_institution_id`) REFERENCES `financial_institution` (`id`)
  52. ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
  53. /*!40101 SET character_set_client = @saved_cs_client */;
  54.  
  55. --
  56. -- Table structure for table `audit_trail`
  57. --
  58.  
  59. DROP TABLE IF EXISTS `audit_trail`;
  60. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  61. /*!40101 SET character_set_client = utf8 */;
  62. CREATE TABLE `audit_trail` (
  63.   `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
  64.   `event` VARCHAR(255) DEFAULT NULL,
  65.   `message` VARCHAR(255) DEFAULT NULL,
  66.   `user_id` BIGINT(20) DEFAULT NULL,
  67.   `event_date` datetime DEFAULT NULL,
  68.   `additional` VARCHAR(255) DEFAULT NULL,
  69.   `affected_entity_id` BIGINT(20) DEFAULT NULL,
  70.   `financial_institution_id` BIGINT(20) DEFAULT NULL,
  71.   `device_id` BIGINT(20) DEFAULT NULL,
  72.   `ip_address` VARCHAR(255) DEFAULT NULL,
  73.   `username` VARCHAR(255) DEFAULT NULL,
  74.   PRIMARY KEY (`id`),
  75.   KEY `ix_audit_trail_user_4` (`user_id`),
  76.   KEY `ix_audit_trail_financialInstitution_5` (`financial_institution_id`),
  77.   KEY `ix_audit_trail_device_6` (`device_id`),
  78.   CONSTRAINT `fk_audit_trail_device_6` FOREIGN KEY (`device_id`) REFERENCES `device` (`id`),
  79.   CONSTRAINT `fk_audit_trail_financialInstitution_5` FOREIGN KEY (`financial_institution_id`) REFERENCES `financial_institution` (`id`),
  80.   CONSTRAINT `fk_audit_trail_user_4` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`)
  81. ) ENGINE=InnoDB AUTO_INCREMENT=138 DEFAULT CHARSET=utf8;
  82. /*!40101 SET character_set_client = @saved_cs_client */;
  83.  
  84. --
  85. -- Table structure for table `branch`
  86. --
  87.  
  88. DROP TABLE IF EXISTS `branch`;
  89. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  90. /*!40101 SET character_set_client = utf8 */;
  91. CREATE TABLE `branch` (
  92.   `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
  93.   `branch_name` VARCHAR(255) DEFAULT NULL,
  94.   `branch_code` VARCHAR(255) DEFAULT NULL,
  95.   `is_enabled` tinyint(1) DEFAULT '0',
  96.   `financial_institution_id` BIGINT(20) DEFAULT NULL,
  97.   PRIMARY KEY (`id`),
  98.   KEY `ix_branch_financialInstitution_7` (`financial_institution_id`),
  99.   CONSTRAINT `fk_branch_financialInstitution_7` FOREIGN KEY (`financial_institution_id`) REFERENCES `financial_institution` (`id`)
  100. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
  101. /*!40101 SET character_set_client = @saved_cs_client */;
  102.  
  103. --
  104. -- Table structure for table `config`
  105. --
  106.  
  107. DROP TABLE IF EXISTS `config`;
  108. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  109. /*!40101 SET character_set_client = utf8 */;
  110. CREATE TABLE `config` (
  111.   `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
  112.   `config_name` VARCHAR(255) DEFAULT NULL,
  113.   `config_value` INT(11) DEFAULT NULL,
  114.   `financial_institution_id` BIGINT(20) DEFAULT NULL,
  115.   PRIMARY KEY (`id`),
  116.   KEY `ix_config_financialInstitution_8` (`financial_institution_id`),
  117.   CONSTRAINT `fk_config_financialInstitution_8` FOREIGN KEY (`financial_institution_id`) REFERENCES `financial_institution` (`id`)
  118. ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
  119. /*!40101 SET character_set_client = @saved_cs_client */;
  120.  
  121. --
  122. -- Table structure for table `device`
  123. --
  124.  
  125. DROP TABLE IF EXISTS `device`;
  126. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  127. /*!40101 SET character_set_client = utf8 */;
  128. CREATE TABLE `device` (
  129.   `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
  130.   `brand` VARCHAR(255) DEFAULT NULL,
  131.   `model` VARCHAR(255) DEFAULT NULL,
  132.   `os` VARCHAR(255) DEFAULT NULL,
  133.   `device_uid` VARCHAR(255) DEFAULT NULL,
  134.   `is_enabled` tinyint(1) DEFAULT '0',
  135.   `financial_institution_id` BIGINT(20) DEFAULT NULL,
  136.   `dsa_id` BIGINT(20) DEFAULT NULL,
  137.   PRIMARY KEY (`id`),
  138.   KEY `ix_device_financialInstitution_9` (`financial_institution_id`),
  139.   KEY `ix_device_dsa_10` (`dsa_id`),
  140.   CONSTRAINT `fk_device_dsa_10` FOREIGN KEY (`dsa_id`) REFERENCES `dsa` (`id`),
  141.   CONSTRAINT `fk_device_financialInstitution_9` FOREIGN KEY (`financial_institution_id`) REFERENCES `financial_institution` (`id`)
  142. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
  143. /*!40101 SET character_set_client = @saved_cs_client */;
  144.  
  145. --
  146. -- Table structure for table `device_history`
  147. --
  148.  
  149. DROP TABLE IF EXISTS `device_history`;
  150. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  151. /*!40101 SET character_set_client = utf8 */;
  152. CREATE TABLE `device_history` (
  153.   `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
  154.   `event_type` VARCHAR(255) DEFAULT NULL,
  155.   `ip_address` VARCHAR(255) DEFAULT NULL,
  156.   `user_id` BIGINT(20) DEFAULT NULL,
  157.   `financial_institution_id` BIGINT(20) DEFAULT NULL,
  158.   `device_id` BIGINT(20) DEFAULT NULL,
  159.   `event_date` datetime NOT NULL,
  160.   PRIMARY KEY (`id`),
  161.   KEY `ix_device_history_user_11` (`user_id`),
  162.   KEY `ix_device_history_financialInstitution_12` (`financial_institution_id`),
  163.   KEY `ix_device_history_device_13` (`device_id`),
  164.   CONSTRAINT `fk_device_history_device_13` FOREIGN KEY (`device_id`) REFERENCES `device` (`id`),
  165.   CONSTRAINT `fk_device_history_financialInstitution_12` FOREIGN KEY (`financial_institution_id`) REFERENCES `financial_institution` (`id`),
  166.   CONSTRAINT `fk_device_history_user_11` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`)
  167. ) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;
  168. /*!40101 SET character_set_client = @saved_cs_client */;
  169.  
  170. --
  171. -- Table structure for table `dsa`
  172. --
  173.  
  174. DROP TABLE IF EXISTS `dsa`;
  175. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  176. /*!40101 SET character_set_client = utf8 */;
  177. CREATE TABLE `dsa` (
  178.   `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
  179.   `till_account` VARCHAR(255) DEFAULT NULL,
  180.   `user_id` BIGINT(20) NOT NULL,
  181.   PRIMARY KEY (`id`),
  182.   KEY `ix_dsa_user_14` (`user_id`),
  183.   CONSTRAINT `fk_dsa_user_14` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`)
  184. ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
  185. /*!40101 SET character_set_client = @saved_cs_client */;
  186.  
  187. --
  188. -- Table structure for table `financial_institution`
  189. --
  190.  
  191. DROP TABLE IF EXISTS `financial_institution`;
  192. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  193. /*!40101 SET character_set_client = utf8 */;
  194. CREATE TABLE `financial_institution` (
  195.   `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
  196.   `code` VARCHAR(255) DEFAULT NULL,
  197.   `ip_address` VARCHAR(255) DEFAULT NULL,
  198.   `switch_key` VARCHAR(255) DEFAULT NULL,
  199.   `name` VARCHAR(255) DEFAULT NULL,
  200.   `account_opening_end_point` VARCHAR(255) DEFAULT NULL,
  201.   `is_enabled` tinyint(1) DEFAULT '0',
  202.   PRIMARY KEY (`id`),
  203.   UNIQUE KEY `uq_financial_institution_code` (`code`),
  204.   UNIQUE KEY `uq_financial_institution_ip_address` (`ip_address`),
  205.   UNIQUE KEY `uq_financial_institution_switch_key` (`switch_key`),
  206.   UNIQUE KEY `uq_financial_institution_name` (`name`),
  207.   UNIQUE KEY `uq_financial_institution_account_opening_end_point` (`account_opening_end_point`)
  208. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
  209. /*!40101 SET character_set_client = @saved_cs_client */;
  210.  
  211. --
  212. -- Table structure for table `holiday`
  213. --
  214.  
  215. DROP TABLE IF EXISTS `holiday`;
  216. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  217. /*!40101 SET character_set_client = utf8 */;
  218. CREATE TABLE `holiday` (
  219.   `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
  220.   `name` VARCHAR(255) DEFAULT NULL,
  221.   `start_date` datetime DEFAULT NULL,
  222.   `end_date` datetime DEFAULT NULL,
  223.   `is_enabled` tinyint(1) DEFAULT '0',
  224.   `financial_institution_id` BIGINT(20) DEFAULT NULL,
  225.   PRIMARY KEY (`id`),
  226.   KEY `ix_holiday_financialInstitution_15` (`financial_institution_id`),
  227.   CONSTRAINT `fk_holiday_financialInstitution_15` FOREIGN KEY (`financial_institution_id`) REFERENCES `financial_institution` (`id`)
  228. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
  229. /*!40101 SET character_set_client = @saved_cs_client */;
  230.  
  231. --
  232. -- Table structure for table `holiday_history`
  233. --
  234.  
  235. DROP TABLE IF EXISTS `holiday_history`;
  236. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  237. /*!40101 SET character_set_client = utf8 */;
  238. CREATE TABLE `holiday_history` (
  239.   `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
  240.   `event_type` VARCHAR(255) DEFAULT NULL,
  241.   `ip_address` VARCHAR(255) DEFAULT NULL,
  242.   `user_id` BIGINT(20) DEFAULT NULL,
  243.   `financial_institution_id` BIGINT(20) DEFAULT NULL,
  244.   `holiday_id` BIGINT(20) DEFAULT NULL,
  245.   `event_date` datetime NOT NULL,
  246.   PRIMARY KEY (`id`),
  247.   KEY `ix_holiday_history_user_16` (`user_id`),
  248.   KEY `ix_holiday_history_financialInstitution_17` (`financial_institution_id`),
  249.   KEY `ix_holiday_history_holiday_18` (`holiday_id`),
  250.   CONSTRAINT `fk_holiday_history_financialInstitution_17` FOREIGN KEY (`financial_institution_id`) REFERENCES `financial_institution` (`id`),
  251.   CONSTRAINT `fk_holiday_history_holiday_18` FOREIGN KEY (`holiday_id`) REFERENCES `holiday` (`id`),
  252.   CONSTRAINT `fk_holiday_history_user_16` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`)
  253. ) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;
  254. /*!40101 SET character_set_client = @saved_cs_client */;
  255.  
  256. --
  257. -- Table structure for table `igroup`
  258. --
  259.  
  260. DROP TABLE IF EXISTS `igroup`;
  261. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  262. /*!40101 SET character_set_client = utf8 */;
  263. CREATE TABLE `igroup` (
  264.   `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
  265.   `name` VARCHAR(255) DEFAULT NULL,
  266.   `description` VARCHAR(255) DEFAULT NULL,
  267.   PRIMARY KEY (`id`)
  268. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  269. /*!40101 SET character_set_client = @saved_cs_client */;
  270.  
  271. --
  272. -- Table structure for table `license`
  273. --
  274.  
  275. DROP TABLE IF EXISTS `license`;
  276. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  277. /*!40101 SET character_set_client = utf8 */;
  278. CREATE TABLE `license` (
  279.   `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
  280.   `license_name` VARCHAR(255) DEFAULT NULL,
  281.   `license_value` INT(11) DEFAULT NULL,
  282.   `financial_institution_id` BIGINT(20) DEFAULT NULL,
  283.   PRIMARY KEY (`id`),
  284.   KEY `ix_license_financialInstitution_19` (`financial_institution_id`),
  285.   CONSTRAINT `fk_license_financialInstitution_19` FOREIGN KEY (`financial_institution_id`) REFERENCES `financial_institution` (`id`)
  286. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
  287. /*!40101 SET character_set_client = @saved_cs_client */;
  288.  
  289. --
  290. -- Table structure for table `location`
  291. --
  292.  
  293. DROP TABLE IF EXISTS `location`;
  294. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  295. /*!40101 SET character_set_client = utf8 */;
  296. CREATE TABLE `location` (
  297.   `coordinates` VARCHAR(255) NOT NULL,
  298.   `address` VARCHAR(255) DEFAULT NULL,
  299.   PRIMARY KEY (`coordinates`)
  300. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  301. /*!40101 SET character_set_client = @saved_cs_client */;
  302.  
  303. --
  304. -- Table structure for table `play_evolutions`
  305. --
  306.  
  307. DROP TABLE IF EXISTS `play_evolutions`;
  308. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  309. /*!40101 SET character_set_client = utf8 */;
  310. CREATE TABLE `play_evolutions` (
  311.   `id` INT(11) NOT NULL,
  312.   `hash` VARCHAR(255) NOT NULL,
  313.   `applied_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  314.   `apply_script` text,
  315.   `revert_script` text,
  316.   `state` VARCHAR(255) DEFAULT NULL,
  317.   `last_problem` text,
  318.   PRIMARY KEY (`id`)
  319. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  320. /*!40101 SET character_set_client = @saved_cs_client */;
  321.  
  322. --
  323. -- Table structure for table `privilege`
  324. --
  325.  
  326. DROP TABLE IF EXISTS `privilege`;
  327. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  328. /*!40101 SET character_set_client = utf8 */;
  329. CREATE TABLE `privilege` (
  330.   `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
  331.   `name` VARCHAR(255) DEFAULT NULL,
  332.   `description` VARCHAR(255) DEFAULT NULL,
  333.   PRIMARY KEY (`id`)
  334. ) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8;
  335. /*!40101 SET character_set_client = @saved_cs_client */;
  336.  
  337. --
  338. -- Table structure for table `transaction_request`
  339. --
  340.  
  341. DROP TABLE IF EXISTS `transaction_request`;
  342. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  343. /*!40101 SET character_set_client = utf8 */;
  344. CREATE TABLE `transaction_request` (
  345.   `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
  346.   `tran_type` VARCHAR(255) DEFAULT NULL,
  347.   `location` VARCHAR(255) DEFAULT NULL,
  348.   `customer_account` VARCHAR(255) DEFAULT NULL,
  349.   `amount` BIGINT(20) DEFAULT NULL,
  350.   `dsa_id` BIGINT(20) DEFAULT NULL,
  351.   `device_id` BIGINT(20) DEFAULT NULL,
  352.   `financial_institution_id` BIGINT(20) DEFAULT NULL,
  353.   `request_date` datetime DEFAULT NULL,
  354.   `response_date` datetime DEFAULT NULL,
  355.   `response_code` VARCHAR(255) DEFAULT NULL,
  356.   `response_message` VARCHAR(255) DEFAULT NULL,
  357.   PRIMARY KEY (`id`),
  358.   KEY `ix_transaction_request_dsa_20` (`dsa_id`),
  359.   KEY `ix_transaction_request_device_21` (`device_id`),
  360.   KEY `ix_transaction_request_financialInstitution_22` (`financial_institution_id`),
  361.   CONSTRAINT `fk_transaction_request_device_21` FOREIGN KEY (`device_id`) REFERENCES `device` (`id`),
  362.   CONSTRAINT `fk_transaction_request_dsa_20` FOREIGN KEY (`dsa_id`) REFERENCES `dsa` (`id`),
  363.   CONSTRAINT `fk_transaction_request_financialInstitution_22` FOREIGN KEY (`financial_institution_id`) REFERENCES `financial_institution` (`id`)
  364. ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
  365. /*!40101 SET character_set_client = @saved_cs_client */;
  366.  
  367. --
  368. -- Table structure for table `user`
  369. --
  370.  
  371. DROP TABLE IF EXISTS `user`;
  372. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  373. /*!40101 SET character_set_client = utf8 */;
  374. CREATE TABLE `user` (
  375.   `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
  376.   `username` VARCHAR(255) DEFAULT NULL,
  377.   `password_hash` VARCHAR(255) DEFAULT NULL,
  378.   `is_enabled` tinyint(1) DEFAULT '0',
  379.   `group_id` BIGINT(20) DEFAULT NULL,
  380.   `branch_id` BIGINT(20) DEFAULT NULL,
  381.   `financial_institution_id` BIGINT(20) DEFAULT NULL,
  382.   PRIMARY KEY (`id`),
  383.   UNIQUE KEY `uq_user_username` (`username`),
  384.   UNIQUE KEY `uq_user_1` (`username`,`financial_institution_id`),
  385.   KEY `ix_user_group_23` (`group_id`),
  386.   KEY `ix_user_branch_24` (`branch_id`),
  387.   KEY `ix_user_financialInstitution_25` (`financial_institution_id`),
  388.   CONSTRAINT `fk_user_branch_24` FOREIGN KEY (`branch_id`) REFERENCES `branch` (`id`),
  389.   CONSTRAINT `fk_user_financialInstitution_25` FOREIGN KEY (`financial_institution_id`) REFERENCES `financial_institution` (`id`),
  390.   CONSTRAINT `fk_user_group_23` FOREIGN KEY (`group_id`) REFERENCES `igroup` (`id`)
  391. ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
  392. /*!40101 SET character_set_client = @saved_cs_client */;
  393.  
  394. --
  395. -- Table structure for table `user_privilege`
  396. --
  397.  
  398. DROP TABLE IF EXISTS `user_privilege`;
  399. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  400. /*!40101 SET character_set_client = utf8 */;
  401. CREATE TABLE `user_privilege` (
  402.   `privilege_id` BIGINT(20) NOT NULL,
  403.   `user_id` BIGINT(20) NOT NULL,
  404.   PRIMARY KEY (`privilege_id`,`user_id`),
  405.   KEY `fk_user_privilege_user_02` (`user_id`),
  406.   CONSTRAINT `fk_user_privilege_privilege_01` FOREIGN KEY (`privilege_id`) REFERENCES `privilege` (`id`),
  407.   CONSTRAINT `fk_user_privilege_user_02` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`)
  408. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  409. /*!40101 SET character_set_client = @saved_cs_client */;
  410.  
  411. --
  412. -- Table structure for table `user_profile`
  413. --
  414.  
  415. DROP TABLE IF EXISTS `user_profile`;
  416. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  417. /*!40101 SET character_set_client = utf8 */;
  418. CREATE TABLE `user_profile` (
  419.   `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
  420.   `first_name` VARCHAR(255) DEFAULT NULL,
  421.   `last_name` VARCHAR(255) DEFAULT NULL,
  422.   `middle_name` VARCHAR(255) DEFAULT NULL,
  423.   `email` VARCHAR(255) DEFAULT NULL,
  424.   `phone_number` VARCHAR(255) DEFAULT NULL,
  425.   `staff_number` VARCHAR(255) DEFAULT NULL,
  426.   `user_id` BIGINT(20) NOT NULL,
  427.   PRIMARY KEY (`id`),
  428.   KEY `ix_user_profile_user_26` (`user_id`),
  429.   CONSTRAINT `fk_user_profile_user_26` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`)
  430. ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
  431. /*!40101 SET character_set_client = @saved_cs_client */;
  432. /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  433.  
  434. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  435. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  436. /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  437. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  438. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  439. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  440. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  441.  
  442. -- Dump completed on 2015-03-19 13:17:31
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement