-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
rest-api/src/main/java/life/qbic/data_download/rest/security/jpa/setup-user-tables.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
USE data_management; | ||
CREATE TABLE `ngs_measurements` | ||
( | ||
`measurement_id` varchar(255) NOT NULL, | ||
`measurementCode` varchar(255) DEFAULT NULL, | ||
`projectId` varchar(255) DEFAULT NULL, | ||
PRIMARY KEY (`measurement_id`) | ||
) ENGINE = InnoDB | ||
DEFAULT CHARSET = utf8mb4 | ||
COLLATE = utf8mb4_general_ci; | ||
|
||
CREATE TABLE `personal_access_tokens` | ||
( | ||
`id` int(11) NOT NULL, | ||
`tokenValueEncrypted` varchar(255) DEFAULT NULL, | ||
`creationDate` datetime(6) DEFAULT NULL, | ||
`duration` decimal(21, 0) DEFAULT NULL, | ||
`userId` varchar(255) DEFAULT NULL, | ||
PRIMARY KEY (`id`) | ||
) ENGINE = InnoDB | ||
DEFAULT CHARSET = utf8mb4 | ||
COLLATE = utf8mb4_general_ci; | ||
|
||
CREATE TABLE `proteomics_measurement` | ||
( | ||
`measurement_id` varchar(255) NOT NULL, | ||
`measurementCode` varchar(255) DEFAULT NULL, | ||
`projectId` varchar(255) DEFAULT NULL, | ||
PRIMARY KEY (`measurement_id`) | ||
) ENGINE = InnoDB | ||
DEFAULT CHARSET = utf8mb4 | ||
COLLATE = utf8mb4_general_ci; | ||
|
||
CREATE TABLE `roles` | ||
( | ||
`id` bigint(20) NOT NULL AUTO_INCREMENT, | ||
`description` varchar(255) DEFAULT NULL, | ||
`name` varchar(255) DEFAULT NULL, | ||
PRIMARY KEY (`id`) | ||
) ENGINE = InnoDB | ||
DEFAULT CHARSET = utf8mb4 | ||
COLLATE = utf8mb4_general_ci; | ||
|
||
CREATE TABLE `users` | ||
( | ||
`id` varchar(255) NOT NULL, | ||
`active` bit(1) NOT NULL, | ||
PRIMARY KEY (`id`) | ||
) ENGINE = InnoDB | ||
DEFAULT CHARSET = utf8mb4 | ||
COLLATE = utf8mb4_general_ci; | ||
|
||
CREATE TABLE `user_role` | ||
( | ||
`id` bigint(20) NOT NULL AUTO_INCREMENT, | ||
`roleId` bigint(20) NOT NULL, | ||
`userId` varchar(255) NOT NULL, | ||
PRIMARY KEY (`id`), | ||
KEY `FK_userId` (`userId`), | ||
KEY `FK_roleId` (`roleId`), | ||
CONSTRAINT `FK_roleId` FOREIGN KEY (`roleId`) REFERENCES `roles` (`id`), | ||
CONSTRAINT `FK_userId` FOREIGN KEY (`userId`) REFERENCES `users` (`id`) | ||
) ENGINE = InnoDB | ||
DEFAULT CHARSET = utf8mb4 | ||
COLLATE = utf8mb4_general_ci; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters