Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
436 lines (380 sloc) 14.6 KB
-- MySQL dump 10.13 Distrib 5.5.31, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: studentPortal
-- ------------------------------------------------------
-- Server version 5.5.31-0ubuntu0.13.04.1
/*!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 `actions`
--
DROP TABLE IF EXISTS `actions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `actions` (
`actionID` int(11) NOT NULL AUTO_INCREMENT,
`actionName` varchar(20) NOT NULL,
`description` tinytext NOT NULL,
`status` int(11) NOT NULL DEFAULT '1',
`dateCreated` datetime NOT NULL,
`insertedBy` int(11) NOT NULL,
`dateModified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`updatedBy` int(11) NOT NULL,
PRIMARY KEY (`actionID`),
UNIQUE KEY `actionName` (`actionName`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `actions`
--
LOCK TABLES `actions` WRITE;
/*!40000 ALTER TABLE `actions` DISABLE KEYS */;
/*!40000 ALTER TABLE `actions` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `entityStates`
--
DROP TABLE IF EXISTS `entityStates`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `entityStates` (
`entityStateID` int(11) NOT NULL AUTO_INCREMENT,
`entityStateName` varchar(60) NOT NULL,
`selectable` int(11) NOT NULL DEFAULT '0',
`dateCreated` datetime NOT NULL,
`insertedBy` int(11) NOT NULL,
`dateModified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`updatedBy` int(11) NOT NULL,
PRIMARY KEY (`entityStateID`),
UNIQUE KEY `entityStateName` (`entityStateName`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `entityStates`
--
LOCK TABLES `entityStates` WRITE;
/*!40000 ALTER TABLE `entityStates` DISABLE KEYS */;
INSERT INTO `entityStates` VALUES (1,'ACTIVE',1,'2013-05-26 22:49:11',1,'2013-05-26 19:49:11',1);
/*!40000 ALTER TABLE `entityStates` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `groups`
--
DROP TABLE IF EXISTS `groups`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `groups` (
`groupID` int(11) NOT NULL AUTO_INCREMENT,
`status` int(11) NOT NULL DEFAULT '1',
`dateCreated` datetime NOT NULL,
`insertedBy` int(11) NOT NULL,
`dateModified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`updatedBy` int(11) NOT NULL,
PRIMARY KEY (`groupID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `groups`
--
LOCK TABLES `groups` WRITE;
/*!40000 ALTER TABLE `groups` DISABLE KEYS */;
/*!40000 ALTER TABLE `groups` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `halls`
--
DROP TABLE IF EXISTS `halls`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `halls` (
`hallID` int(11) NOT NULL AUTO_INCREMENT,
`hallName` varchar(40) NOT NULL,
`hallInfo` tinytext,
`status` int(11) NOT NULL DEFAULT '1',
`dateCreated` datetime NOT NULL,
`insertedBy` int(11) NOT NULL,
`dateModified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`updatedBy` int(11) NOT NULL,
PRIMARY KEY (`hallID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `halls`
--
LOCK TABLES `halls` WRITE;
/*!40000 ALTER TABLE `halls` DISABLE KEYS */;
/*!40000 ALTER TABLE `halls` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `moduleActions`
--
DROP TABLE IF EXISTS `moduleActions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `moduleActions` (
`moduleActionID` int(11) NOT NULL AUTO_INCREMENT,
`moduleID` int(11) NOT NULL,
`actionID` int(11) NOT NULL,
`status` int(11) NOT NULL DEFAULT '1',
`dateCreated` datetime NOT NULL,
`insertedBy` int(11) NOT NULL,
`dateModified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`updatedBy` int(11) NOT NULL,
PRIMARY KEY (`moduleActionID`),
KEY `moduleID` (`moduleID`),
KEY `actionID` (`actionID`),
CONSTRAINT `moduleActions_ibfk_1` FOREIGN KEY (`moduleID`) REFERENCES `modules` (`moduleID`),
CONSTRAINT `moduleActions_ibfk_2` FOREIGN KEY (`actionID`) REFERENCES `actions` (`actionID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `moduleActions`
--
LOCK TABLES `moduleActions` WRITE;
/*!40000 ALTER TABLE `moduleActions` DISABLE KEYS */;
/*!40000 ALTER TABLE `moduleActions` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `modules`
--
DROP TABLE IF EXISTS `modules`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `modules` (
`moduleID` int(11) NOT NULL AUTO_INCREMENT,
`moduleName` varchar(20) NOT NULL,
`description` tinytext NOT NULL,
`status` int(11) NOT NULL DEFAULT '1',
`dateCreated` datetime NOT NULL,
`insertedBy` int(11) NOT NULL,
`dateModified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`updatedBy` int(11) NOT NULL,
PRIMARY KEY (`moduleID`),
UNIQUE KEY `moduleName` (`moduleName`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `modules`
--
LOCK TABLES `modules` WRITE;
/*!40000 ALTER TABLE `modules` DISABLE KEYS */;
/*!40000 ALTER TABLE `modules` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `permissions`
--
DROP TABLE IF EXISTS `permissions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `permissions` (
`permissionID` int(11) NOT NULL AUTO_INCREMENT,
`moduleActionID` int(11) NOT NULL,
`groupID` int(11) NOT NULL,
`status` int(11) NOT NULL DEFAULT '1',
`dateCreated` datetime NOT NULL,
`insertedBy` int(11) NOT NULL,
`dateModified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`updatedBy` int(11) NOT NULL,
PRIMARY KEY (`permissionID`),
KEY `moduleActionID` (`moduleActionID`),
KEY `groupID` (`groupID`),
CONSTRAINT `permissions_ibfk_1` FOREIGN KEY (`moduleActionID`) REFERENCES `moduleActions` (`moduleActionID`),
CONSTRAINT `permissions_ibfk_2` FOREIGN KEY (`groupID`) REFERENCES `groups` (`groupID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `permissions`
--
LOCK TABLES `permissions` WRITE;
/*!40000 ALTER TABLE `permissions` DISABLE KEYS */;
/*!40000 ALTER TABLE `permissions` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `rooms`
--
DROP TABLE IF EXISTS `rooms`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rooms` (
`roomID` int(11) NOT NULL AUTO_INCREMENT,
`hallID` int(11) NOT NULL,
`roomNo` varchar(20) NOT NULL,
`bedspace` int(11) NOT NULL DEFAULT '4',
`occupancy` int(11) NOT NULL DEFAULT '0',
`status` int(11) NOT NULL DEFAULT '1',
`dateCreated` datetime NOT NULL,
`insertedBy` int(11) NOT NULL,
`dateModified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`updatedBy` int(11) NOT NULL,
PRIMARY KEY (`roomID`),
KEY `hallID` (`hallID`),
CONSTRAINT `rooms_ibfk_1` FOREIGN KEY (`hallID`) REFERENCES `halls` (`hallID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `rooms`
--
LOCK TABLES `rooms` WRITE;
/*!40000 ALTER TABLE `rooms` DISABLE KEYS */;
/*!40000 ALTER TABLE `rooms` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `studentProfiles`
--
DROP TABLE IF EXISTS `studentProfiles`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `studentProfiles` (
`studentProfileID` int(11) NOT NULL AUTO_INCREMENT,
`userID` int(11) NOT NULL,
`studentTypeID` int(11) NOT NULL,
`status` int(11) NOT NULL DEFAULT '1',
`dateCreated` datetime NOT NULL,
`insertedBy` int(11) NOT NULL,
`dateModified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`updatedBy` int(11) NOT NULL,
PRIMARY KEY (`studentProfileID`),
KEY `userID` (`userID`),
KEY `studentTypeID` (`studentTypeID`),
CONSTRAINT `studentProfiles_ibfk_1` FOREIGN KEY (`userID`) REFERENCES `users` (`userID`),
CONSTRAINT `studentProfiles_ibfk_2` FOREIGN KEY (`studentTypeID`) REFERENCES `studentTypes` (`studentTypeID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `studentProfiles`
--
LOCK TABLES `studentProfiles` WRITE;
/*!40000 ALTER TABLE `studentProfiles` DISABLE KEYS */;
/*!40000 ALTER TABLE `studentProfiles` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `studentRoomMappings`
--
DROP TABLE IF EXISTS `studentRoomMappings`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `studentRoomMappings` (
`studentRoomMappingID` int(11) NOT NULL AUTO_INCREMENT,
`studentProfileID` int(11) NOT NULL,
`roomID` int(11) NOT NULL,
`status` int(11) NOT NULL DEFAULT '1',
`dateCreated` datetime NOT NULL,
`insertedBy` int(11) NOT NULL,
`dateModified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`updatedBy` int(11) NOT NULL,
PRIMARY KEY (`studentRoomMappingID`),
KEY `studentProfileID` (`studentProfileID`),
KEY `roomID` (`roomID`),
CONSTRAINT `studentRoomMappings_ibfk_1` FOREIGN KEY (`studentProfileID`) REFERENCES `studentProfiles` (`studentProfileID`),
CONSTRAINT `studentRoomMappings_ibfk_2` FOREIGN KEY (`roomID`) REFERENCES `rooms` (`roomID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `studentRoomMappings`
--
LOCK TABLES `studentRoomMappings` WRITE;
/*!40000 ALTER TABLE `studentRoomMappings` DISABLE KEYS */;
/*!40000 ALTER TABLE `studentRoomMappings` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `studentTypes`
--
DROP TABLE IF EXISTS `studentTypes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `studentTypes` (
`studentTypeID` int(11) NOT NULL AUTO_INCREMENT,
`studentTypeName` varchar(60) NOT NULL,
`status` int(11) NOT NULL DEFAULT '1',
`dateCreated` datetime NOT NULL,
`insertedBy` int(11) NOT NULL,
`dateModified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`updatedBy` int(11) NOT NULL,
PRIMARY KEY (`studentTypeID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `studentTypes`
--
LOCK TABLES `studentTypes` WRITE;
/*!40000 ALTER TABLE `studentTypes` DISABLE KEYS */;
/*!40000 ALTER TABLE `studentTypes` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `userGroupMappings`
--
DROP TABLE IF EXISTS `userGroupMappings`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `userGroupMappings` (
`userGroupMappingID` int(11) NOT NULL AUTO_INCREMENT,
`groupID` int(11) NOT NULL,
`userID` int(11) NOT NULL,
`status` int(11) NOT NULL DEFAULT '1',
`dateCreated` datetime NOT NULL,
`insertedBy` int(11) NOT NULL,
`dateModified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`updatedBy` int(11) NOT NULL,
PRIMARY KEY (`userGroupMappingID`),
KEY `userID` (`userID`),
KEY `groupID` (`groupID`),
CONSTRAINT `userGroupMappings_ibfk_1` FOREIGN KEY (`userID`) REFERENCES `users` (`userID`),
CONSTRAINT `userGroupMappings_ibfk_2` FOREIGN KEY (`groupID`) REFERENCES `groups` (`groupID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `userGroupMappings`
--
LOCK TABLES `userGroupMappings` WRITE;
/*!40000 ALTER TABLE `userGroupMappings` DISABLE KEYS */;
/*!40000 ALTER TABLE `userGroupMappings` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `users` (
`userID` int(11) NOT NULL AUTO_INCREMENT,
`firstName` varchar(60) NOT NULL,
`lastName` varchar(60) NOT NULL,
`userName` varchar(15) NOT NULL,
`email` varchar(60) NOT NULL,
`password` varchar(255) NOT NULL,
`status` tinyint(3) NOT NULL DEFAULT '1',
`dateCreated` datetime NOT NULL,
`insertedBy` int(11) NOT NULL,
`dateModified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`updatedBy` int(11) NOT NULL,
`dateActivated` datetime NOT NULL,
PRIMARY KEY (`userID`),
UNIQUE KEY `userName` (`userName`),
UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `users`
--
LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES (1,'Test','User','tuser','test@user.com','34252',1,'2013-05-26 21:57:40',1,'2013-05-26 18:57:40',1,'0000-00-00 00:00:00');
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;
/*!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 2013-05-28 13:22:48