diff --git a/Makefile b/Makefile index b44347a205dd0414e0538a7c3034df2274ab98bc..aef38b7b03b49c25f5927fbaa1a9e0a12529b13d 100644 --- a/Makefile +++ b/Makefile @@ -1,21 +1,21 @@ include ./config/path.makefile - +GULP = ./node_modules/gulp/bin/gulp.js default: deploy @ # install local gulp and packages, empty db and static site files install: DB_install Tasker_deploy - gulp install + $(GULP) install @ # install local gulp and packages, update db routines and static site files deploy: DB_deploy Tasker_deploy - gulp + $(GULP) # copy server files copy_files: Tasker_deploy - gulp --release --force + $(GULP) --release --force rsync -ru --exclude="application/config" --exclude="news.md" --exclude="updates.md" \ \~dev_rating/ $(DST_PATH) @@ -26,7 +26,7 @@ release_no_fix: DB_deploy copy_files release: DB_fix server_deploy # server deploy with dump load -load_deploy: DB_deploy_test copy_files +load_deploy: DB_deployTest copy_files # ----------------------- @@ -39,4 +39,4 @@ Tasker_deploy: # database forwarding DB_%: - @$(MAKE) $* -C ./db \ No newline at end of file + @$(MAKE) $* -C ./db diff --git a/db/Makefile b/db/Makefile index 86b73429dc66591e0acb40a6aaaa7b0813fd1e35..20c165d50b6ecd066fb5f7c2689c90a23fb4f921 100644 --- a/db/Makefile +++ b/db/Makefile @@ -56,16 +56,18 @@ hideData: ActivationCode= null, \ EMail= null" | mysql --database=$(DB) $(FLAGS) -deploy_test: \ +deployTest: \ clear \ ../../mmcs_rating \ fix \ deploy \ hideData + @ update: \ deploy \ fix + @ %: @ mysql --database=$(DB) $(FLAGS) < $@.sql diff --git a/db/fixes/01_09_15.sql b/db/fixes/01_09_15.sql index a5cca162b85153e9618975e3d411e3abfba55d90..7c290ddb3e40112807888b8a6120f894e5b9134f 100644 --- a/db/fixes/01_09_15.sql +++ b/db/fixes/01_09_15.sql @@ -1,6 +1,4 @@ -DELIMITER // - -DROP TABLE IF EXISTS `compound_disciplines`// +DROP TABLE IF EXISTS `compound_disciplines`; CREATE TABLE IF NOT EXISTS `compound_disciplines` ( `ID` int(11) NOT NULL AUTO_INCREMENT, @@ -8,20 +6,18 @@ CREATE TABLE IF NOT EXISTS `compound_disciplines` ( `GradeID` int(11) NOT NULL, `SpecializationID` int(11) NOT NULL, PRIMARY KEY (`ID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 // +) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE `disciplines` ADD `CompoundDiscID` INT(11) DEFAULT NULL, - ADD KEY `CompoundDiscID` (`CompoundDiscID`)// + ADD KEY `CompoundDiscID` (`CompoundDiscID`); ALTER TABLE `disciplines` - ADD CONSTRAINT `disciplines_ibfk_6` FOREIGN KEY (`CompoundDiscID`) REFERENCES `compound_disciplines` (`ID`) // + 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`); -DELIMITER ; -