Last active
January 23, 2018 20:16
-
-
Save Levii01/3465990139b1a560b59d7f51783e70db to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# ************************************************************ | |
# Sequel Pro SQL dump | |
# Version 4541 | |
# | |
# http://www.sequelpro.com/ | |
# https://github.com/sequelpro/sequelpro | |
# | |
# Host: localhost (MySQL 5.7.18) | |
# Database: thesis_development | |
# Generation Time: 2018-01-23 20:14:11 +0000 | |
# ************************************************************ | |
/*!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 */; | |
/*!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 */; | |
# Dump of table active_admin_comments | |
# ------------------------------------------------------------ | |
CREATE TABLE `active_admin_comments` ( | |
`id` bigint(20) NOT NULL AUTO_INCREMENT, | |
`namespace` varchar(255) DEFAULT NULL, | |
`body` text, | |
`resource_type` varchar(255) DEFAULT NULL, | |
`resource_id` bigint(20) DEFAULT NULL, | |
`author_type` varchar(255) DEFAULT NULL, | |
`author_id` bigint(20) DEFAULT NULL, | |
`created_at` datetime NOT NULL, | |
`updated_at` datetime NOT NULL, | |
PRIMARY KEY (`id`), | |
KEY `index_active_admin_comments_on_resource_type_and_resource_id` (`resource_type`,`resource_id`), | |
KEY `index_active_admin_comments_on_author_type_and_author_id` (`author_type`,`author_id`), | |
KEY `index_active_admin_comments_on_namespace` (`namespace`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
# Dump of table ar_internal_metadata | |
# ------------------------------------------------------------ | |
CREATE TABLE `ar_internal_metadata` ( | |
`key` varchar(255) NOT NULL, | |
`value` varchar(255) DEFAULT NULL, | |
`created_at` datetime NOT NULL, | |
`updated_at` datetime NOT NULL, | |
PRIMARY KEY (`key`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
# Dump of table diploma_work_groups | |
# ------------------------------------------------------------ | |
CREATE TABLE `diploma_work_groups` ( | |
`id` bigint(20) NOT NULL AUTO_INCREMENT, | |
`diploma_work_id` bigint(20) DEFAULT NULL, | |
`student_id` bigint(20) DEFAULT NULL, | |
`created_at` datetime NOT NULL, | |
`updated_at` datetime NOT NULL, | |
PRIMARY KEY (`id`), | |
KEY `index_diploma_work_groups_on_diploma_work_id` (`diploma_work_id`), | |
KEY `index_diploma_work_groups_on_student_id` (`student_id`), | |
CONSTRAINT `fk_rails_4c07649fd9` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`), | |
CONSTRAINT `fk_rails_6f029b00c7` FOREIGN KEY (`diploma_work_id`) REFERENCES `diploma_works` (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
# Dump of table diploma_work_keywords | |
# ------------------------------------------------------------ | |
CREATE TABLE `diploma_work_keywords` ( | |
`id` bigint(20) NOT NULL AUTO_INCREMENT, | |
`diploma_work_id` bigint(20) DEFAULT NULL, | |
`keyword_id` bigint(20) DEFAULT NULL, | |
`created_at` datetime NOT NULL, | |
`updated_at` datetime NOT NULL, | |
PRIMARY KEY (`id`), | |
KEY `index_diploma_work_keywords_on_diploma_work_id` (`diploma_work_id`), | |
KEY `index_diploma_work_keywords_on_keyword_id` (`keyword_id`), | |
CONSTRAINT `fk_rails_70f4c0c013` FOREIGN KEY (`keyword_id`) REFERENCES `keywords` (`id`), | |
CONSTRAINT `fk_rails_b58e6f358a` FOREIGN KEY (`diploma_work_id`) REFERENCES `diploma_works` (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
# Dump of table diploma_works | |
# ------------------------------------------------------------ | |
CREATE TABLE `diploma_works` ( | |
`id` bigint(20) NOT NULL AUTO_INCREMENT, | |
`thema` varchar(255) DEFAULT NULL, | |
`university_employee_id` bigint(20) DEFAULT NULL, | |
`description` text, | |
`defence_data` date DEFAULT NULL, | |
`date_of_grade` date DEFAULT NULL, | |
`created_at` datetime NOT NULL, | |
`updated_at` datetime NOT NULL, | |
PRIMARY KEY (`id`), | |
KEY `index_diploma_works_on_university_employee_id` (`university_employee_id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
# Dump of table keywords | |
# ------------------------------------------------------------ | |
CREATE TABLE `keywords` ( | |
`id` bigint(20) NOT NULL AUTO_INCREMENT, | |
`key` varchar(255) DEFAULT NULL, | |
`description` text, | |
`created_at` datetime NOT NULL, | |
`updated_at` datetime NOT NULL, | |
PRIMARY KEY (`id`), | |
UNIQUE KEY `index_keywords_on_key` (`key`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
# Dump of table project_files | |
# ------------------------------------------------------------ | |
CREATE TABLE `project_files` ( | |
`id` bigint(20) NOT NULL AUTO_INCREMENT, | |
`file_url` varchar(255) DEFAULT NULL, | |
`diploma_work_id` bigint(20) DEFAULT NULL, | |
`created_at` datetime NOT NULL, | |
`updated_at` datetime NOT NULL, | |
PRIMARY KEY (`id`), | |
KEY `index_project_files_on_diploma_work_id` (`diploma_work_id`), | |
CONSTRAINT `fk_rails_b1b07cb19e` FOREIGN KEY (`diploma_work_id`) REFERENCES `diploma_works` (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
# Dump of table reviews | |
# ------------------------------------------------------------ | |
CREATE TABLE `reviews` ( | |
`id` bigint(20) NOT NULL AUTO_INCREMENT, | |
`diploma_work_id` bigint(20) DEFAULT NULL, | |
`university_employee_id` bigint(20) DEFAULT NULL, | |
`student_id` bigint(20) DEFAULT NULL, | |
`description` text, | |
`grade` float DEFAULT NULL, | |
`file_url` varchar(255) DEFAULT NULL, | |
`review_date` date DEFAULT NULL, | |
`created_at` datetime NOT NULL, | |
`updated_at` datetime NOT NULL, | |
PRIMARY KEY (`id`), | |
KEY `index_reviews_on_diploma_work_id` (`diploma_work_id`), | |
KEY `index_reviews_on_university_employee_id` (`university_employee_id`), | |
KEY `index_reviews_on_student_id` (`student_id`), | |
CONSTRAINT `fk_rails_588325907e` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`), | |
CONSTRAINT `fk_rails_9fb34ba380` FOREIGN KEY (`diploma_work_id`) REFERENCES `diploma_works` (`id`), | |
CONSTRAINT `fk_rails_bceff2c945` FOREIGN KEY (`university_employee_id`) REFERENCES `university_employees` (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
# Dump of table roles | |
# ------------------------------------------------------------ | |
CREATE TABLE `roles` ( | |
`id` bigint(20) NOT NULL AUTO_INCREMENT, | |
`name` varchar(255) DEFAULT NULL, | |
`description` text, | |
`created_at` datetime NOT NULL, | |
`updated_at` datetime NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
# Dump of table schema_migrations | |
# ------------------------------------------------------------ | |
CREATE TABLE `schema_migrations` ( | |
`version` varchar(255) NOT NULL, | |
PRIMARY KEY (`version`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
# Dump of table student_types | |
# ------------------------------------------------------------ | |
CREATE TABLE `student_types` ( | |
`id` bigint(20) NOT NULL AUTO_INCREMENT, | |
`department` varchar(255) DEFAULT NULL, | |
`field_of_study` varchar(255) DEFAULT NULL, | |
`specialization` varchar(255) DEFAULT NULL, | |
`study_type` varchar(255) DEFAULT NULL, | |
`created_at` datetime NOT NULL, | |
`updated_at` datetime NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
# Dump of table students | |
# ------------------------------------------------------------ | |
CREATE TABLE `students` ( | |
`id` bigint(20) NOT NULL AUTO_INCREMENT, | |
`album_number` varchar(255) DEFAULT NULL, | |
`semestr` int(11) DEFAULT NULL, | |
`user_id` bigint(20) DEFAULT NULL, | |
`student_type_id` bigint(20) DEFAULT NULL, | |
`created_at` datetime NOT NULL, | |
`updated_at` datetime NOT NULL, | |
PRIMARY KEY (`id`), | |
UNIQUE KEY `index_students_on_album_number` (`album_number`), | |
KEY `index_students_on_user_id` (`user_id`), | |
KEY `index_students_on_student_type_id` (`student_type_id`), | |
CONSTRAINT `fk_rails_148c9e88f4` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`), | |
CONSTRAINT `fk_rails_53aaef090a` FOREIGN KEY (`student_type_id`) REFERENCES `student_types` (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
# Dump of table university_employees | |
# ------------------------------------------------------------ | |
CREATE TABLE `university_employees` ( | |
`id` bigint(20) NOT NULL AUTO_INCREMENT, | |
`degree` varchar(255) DEFAULT NULL, | |
`user_id` bigint(20) DEFAULT NULL, | |
`created_at` datetime NOT NULL, | |
`updated_at` datetime NOT NULL, | |
PRIMARY KEY (`id`), | |
KEY `index_university_employees_on_user_id` (`user_id`), | |
CONSTRAINT `fk_rails_5c803ac949` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
# Dump of table user_roles | |
# ------------------------------------------------------------ | |
CREATE TABLE `user_roles` ( | |
`id` bigint(20) NOT NULL AUTO_INCREMENT, | |
`user_id` bigint(20) DEFAULT NULL, | |
`role_id` bigint(20) DEFAULT NULL, | |
`created_at` datetime NOT NULL, | |
`updated_at` datetime NOT NULL, | |
PRIMARY KEY (`id`), | |
KEY `index_user_roles_on_user_id` (`user_id`), | |
KEY `index_user_roles_on_role_id` (`role_id`), | |
CONSTRAINT `fk_rails_318345354e` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`), | |
CONSTRAINT `fk_rails_3369e0d5fc` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
# Dump of table users | |
# ------------------------------------------------------------ | |
CREATE TABLE `users` ( | |
`id` bigint(20) NOT NULL AUTO_INCREMENT, | |
`first_name` varchar(255) DEFAULT NULL, | |
`last_name` varchar(255) DEFAULT NULL, | |
`sex` varchar(255) DEFAULT NULL, | |
`picture_url` varchar(255) DEFAULT NULL, | |
`birth_date` date DEFAULT NULL, | |
`address` varchar(255) DEFAULT NULL, | |
`nationality` varchar(255) DEFAULT NULL, | |
`email` varchar(255) DEFAULT NULL, | |
`password` varchar(255) DEFAULT NULL, | |
`created_at` datetime NOT NULL, | |
`updated_at` datetime NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; | |
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; | |
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_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 */; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment