diff --git a/db/fixes/15_07_21.sql b/db/fixes/15_07_21.sql deleted file mode 100644 index cb2eac0b86daa9433c27d4794707e8d7137d3ed9..0000000000000000000000000000000000000000 --- a/db/fixes/15_07_21.sql +++ /dev/null @@ -1,11 +0,0 @@ -SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; -SET time_zone = "+00:00"; - - -/*!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 */; - -ALTER TABLE students_groups DROP IsStudyLeave; -ALTER TABLE students_groups ADD `State` enum('common', 'outlet', 'expulsion', 'leave') NOT NULL DEFAULT 'common'; diff --git a/db/fixes/15_07_28.sql b/db/fixes/15_07_28.sql deleted file mode 100644 index 2fc3c9f3a3b138e025388627339ec05bd7c99d71..0000000000000000000000000000000000000000 --- a/db/fixes/15_07_28.sql +++ /dev/null @@ -1,56 +0,0 @@ -SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; -SET time_zone = "+00:00"; - - -/*!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 */; - -CREATE TABLE IF NOT EXISTS `logs_binds_students` ( - `ID` int(11) NOT NULL AUTO_INCREMENT, - `DisciplineID` int(11) NOT NULL, - `TeacherID` int(11) NOT NULL, - `StudentID` int(11) NOT NULL, - `Date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `Type` enum('attach','detach') NOT NULL, - PRIMARY KEY (`ID`), - KEY `TeacherID` (`TeacherID`), - KEY `DisciplineID` (`DisciplineID`), - KEY `StudentID` (`StudentID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - - --- --- Структура таблицы `logs_binds_groups` --- -CREATE TABLE IF NOT EXISTS `logs_binds_groups` ( - `ID` int(11) NOT NULL AUTO_INCREMENT, - `DisciplineID` int(11) NOT NULL, - `TeacherID` int(11) NOT NULL, - `GroupID` int(11) NOT NULL, - `Date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `Type` enum('attach','detach') NOT NULL, - PRIMARY KEY (`ID`), - KEY `TeacherID` (`TeacherID`), - KEY `DisciplineID` (`DisciplineID`), - KEY `GroupID` (`GroupID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - - --- --- Ограничения внешнего ключа таблицы `logs_binds_students` --- -ALTER TABLE `logs_binds_students` - ADD CONSTRAINT `logs_binds_students_ibfk_3` FOREIGN KEY (`StudentID`) REFERENCES `students` (`ID`), - ADD CONSTRAINT `logs_binds_students_ibfk_1` FOREIGN KEY (`DisciplineID`) REFERENCES `disciplines` (`ID`), - ADD CONSTRAINT `logs_binds_students_ibfk_2` FOREIGN KEY (`TeacherID`) REFERENCES `teachers` (`ID`); - - --- --- Ограничения внешнего ключа таблицы `logs_binds_groups` --- -ALTER TABLE `logs_binds_groups` - ADD CONSTRAINT `logs_binds_groups_ibfk_3` FOREIGN KEY (`GroupID`) REFERENCES `study_groups` (`ID`), - ADD CONSTRAINT `logs_binds_groups_ibfk_1` FOREIGN KEY (`DisciplineID`) REFERENCES `disciplines` (`ID`), - ADD CONSTRAINT `logs_binds_groups_ibfk_2` FOREIGN KEY (`TeacherID`) REFERENCES `teachers` (`ID`); diff --git a/db/fixes/15_09_01.sql b/db/fixes/15_09_01.sql deleted file mode 100644 index 7c290ddb3e40112807888b8a6120f894e5b9134f..0000000000000000000000000000000000000000 --- a/db/fixes/15_09_01.sql +++ /dev/null @@ -1,23 +0,0 @@ -DROP TABLE IF EXISTS `compound_disciplines`; - -CREATE TABLE IF NOT EXISTS `compound_disciplines` ( - `ID` int(11) NOT NULL AUTO_INCREMENT, - `Name` varchar(200) CHARACTER SET utf8 NULL DEFAULT 'Курс по выбору', - `GradeID` int(11) NOT NULL, - `SpecializationID` int(11) NOT NULL, - PRIMARY KEY (`ID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - -ALTER TABLE `disciplines` - ADD `CompoundDiscID` INT(11) DEFAULT NULL, - ADD KEY `CompoundDiscID` (`CompoundDiscID`); - -ALTER TABLE `disciplines` - ADD CONSTRAINT `disciplines_ibfk_6` FOREIGN KEY (`CompoundDiscID`) REFERENCES `compound_disciplines` (`ID`); - -ALTER TABLE `compound_disciplines` - ADD CONSTRAINT `compound_disciplines_ibfk_1` FOREIGN KEY (`SpecializationID`) REFERENCES `specializations` (`ID`), - ADD CONSTRAINT `compound_disciplines_ibfk_2` FOREIGN KEY (`GradeID`) REFERENCES `grades` (`ID`); - - diff --git a/db/fixes/15_09_02.sql b/db/fixes/15_09_02.sql deleted file mode 100644 index da1dc52fd36443ec5b1cb8fd6bb119bd57550874..0000000000000000000000000000000000000000 --- a/db/fixes/15_09_02.sql +++ /dev/null @@ -1,2 +0,0 @@ -alter table students_groups drop key StudentID_2; -alter table students_groups add UNIQUE KEY `StudentID_2` (`StudentID`, `SemesterID`);