-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Frontend: - Fixed adaptivity on the home page Backend: - Fixed get full list method for the applications - Added database.sql files for the database migration
- Loading branch information
Showing
5 changed files
with
82 additions
and
20 deletions.
There are no files selected for viewing
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,43 @@ | ||
CREATE TABLE IF NOT EXISTS `role` ( | ||
`id` int NOT NULL COMMENT 'Role ID' AUTO_INCREMENT, | ||
`name` varchar(255) NOT NULL COMMENT 'Role name', | ||
`admin_rights` int COMMENT 'Admin rights', | ||
`applications_list` int COMMENT 'Access to applications list', | ||
PRIMARY KEY (`id`) | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS `user` ( | ||
`id` int NOT NULL COMMENT 'User ID' AUTO_INCREMENT, | ||
`username` varchar(32) NOT NULL UNIQUE COMMENT 'Username', | ||
`password` varchar(255) NOT NULL COMMENT 'Password MD5 Hash', | ||
`company` varchar(255) DEFAULT NULL COMMENT 'Company name', | ||
`email` varchar(128) NOT NULL UNIQUE COMMENT 'Contact e-mail', | ||
`role_id` int DEFAULT NULL COMMENT 'Role ID', | ||
FOREIGN KEY (`role_id`) REFERENCES `role`(`id`), | ||
PRIMARY KEY (`id`) | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS `application_statuses` ( | ||
`id` int NOT NULL COMMENT 'Status ID' AUTO_INCREMENT, | ||
`name` varchar(255) COMMENT 'Status name', | ||
`color` int COMMENT 'Status', | ||
PRIMARY KEY (`id`) | ||
); | ||
|
||
START TRANSACTION; | ||
CREATE INDEX `idx_username` ON `user` (`username`); | ||
CREATE INDEX `idx_email` ON `user` (`email`); | ||
CREATE INDEX `idx_company` ON `user` (`company`); | ||
COMMIT; | ||
|
||
CREATE TABLE IF NOT EXISTS `applications` ( | ||
`id` int NOT NULL AUTO_INCREMENT, | ||
`author_id` int DEFAULT NULL, | ||
`manager_id` int DEFAULT NULL, | ||
`status` int DEFAULT NULL, | ||
`text` VARCHAR(2048), | ||
FOREIGN KEY (`author_id`) REFERENCES `user`(`id`), | ||
FOREIGN KEY (`manager_id`) REFERENCES `user`(`id`), | ||
FOREIGN KEY (`status`) REFERENCES `application_statuses`(`id`), | ||
PRIMARY KEY (`id`) | ||
); |
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
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
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
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