Skip to content

Commit

Permalink
Fixing database creation scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
aniskand committed May 11, 2017
1 parent 98bdfd6 commit ee0af76
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
13 changes: 7 additions & 6 deletions DeploymentPackage/dbScripts/profile_black_list.sql
@@ -1,9 +1,10 @@
use resource_profile;
CREATE TABLE resource_profile.profile_black_list
USE `resource_profile`;

CREATE TABLE `profile_black_list`
(
id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
profileTitle VARCHAR(100) NOT NULL,
userId VARCHAR(20) NOT NULL,
profileID INT(11)
`id` BIGINT PRIMARY KEY NOT NULL AUTO_INCREMENT,
`profileTitle` VARCHAR(100) NOT NULL,
`userId` VARCHAR(20) NOT NULL,
`profileID` INT(11)
);
CREATE UNIQUE INDEX profile_black_list_id_uindex ON resource_profile.profile_black_list (id);
17 changes: 12 additions & 5 deletions DeploymentPackage/dbScripts/userAuthentication.sql
@@ -1,6 +1,13 @@
CREATE TABLE users
USE `resource_profile`;

DROP TABLE IF EXISTS `users`;

CREATE TABLE `users`
(
username VARCHAR(45) PRIMARY KEY NOT NULL,
password VARCHAR(45) NOT NULL,
role VARCHAR(12)
);
`username` VARCHAR(45) PRIMARY KEY NOT NULL,
`password` VARCHAR(45) NOT NULL,
`role` VARCHAR(12)
);

INSERT INTO `users` (`username`, `password`, `role`) VALUES ('root', 'password', 'ADMIN');

3 changes: 2 additions & 1 deletion DeploymentPackage/dbScripts/valueset_and_log.sql
Expand Up @@ -20,7 +20,7 @@ USE `valueset_and_log`;
DROP TABLE IF EXISTS `subset_json`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `valueset_and_log`.`subset_json`
CREATE TABLE `subset_json`
(
`id` INT(11) PRIMARY KEY NOT NULL,
`last_updated` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
Expand All @@ -38,5 +38,6 @@ CREATE TABLE `logs` (
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`clientIP` varchar(45) NOT NULL,
`orgID` varchar(45) NOT NULL,
`response` mediumtext NULL
PRIMARY KEY (`logsId`)
) ENGINE=MyISAM AUTO_INCREMENT=106 DEFAULT CHARSET=latin1;

0 comments on commit ee0af76

Please sign in to comment.