From 0d5f7a413df322fa61996a0a8d30aa9767157dc4 Mon Sep 17 00:00:00 2001 From: RomanSteinberg <romanofficial@yandex.com> Date: Mon, 31 Aug 2015 15:32:09 +0300 Subject: [PATCH] FIX: remove isStudyLeave; Fix: username in makefile --- db/Makefile | 4 ++-- db/stored/functions.sql | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/db/Makefile b/db/Makefile index c3dec2ace..1861d42e3 100644 --- a/db/Makefile +++ b/db/Makefile @@ -3,7 +3,7 @@ $(subst .sql, , $(wildcard $1/*.sql)) endef -USER := $(shell bash -c 'read -p "Username: " pwd; echo $$username') +USER := $(shell bash -c 'read -p "Username: " username; echo $$username') PASS := $(shell bash -c 'read -s -p "Password: " pwd; echo $$pwd') DB := mmcs_rating @@ -20,6 +20,6 @@ deploy: $(call GET_NAMES, stored) %: - mysql -u $(USER) $(PASS) $(DB) < $@.sql + mysql -u $(USER) --password=$(PASS) $(DB) < $@.sql diff --git a/db/stored/functions.sql b/db/stored/functions.sql index 301b1b1af..5140eb921 100644 --- a/db/stored/functions.sql +++ b/db/stored/functions.sql @@ -104,7 +104,7 @@ BEGIN disciplines_groups.GroupID = students_groups.GroupID WHERE students_groups.StudentID = pStudentID AND students_groups.SemesterID = pSemesterID AND - students_groups.IsStudyLeave = FALSE + students_groups.State != 'expulsion' LIMIT 1 ); END // @@ -360,7 +360,7 @@ BEGIN FROM `students_groups` WHERE students_groups.StudentID = pStudentID AND students_groups.SemesterID = pSemesterID AND - students_groups.IsStudyLeave = FALSE + students_groups.State != 'expulsion' LIMIT 1; RETURN vGroupID; -- GitLab