Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SUPERGEEKS-SQL
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Finlay White
SUPERGEEKS-SQL
Commits
f9d21864
Commit
f9d21864
authored
1 year ago
by
Finlay White
Browse files
Options
Downloads
Patches
Plain Diff
test
parent
f7488e4f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
createdb.sql
+24
-2
24 additions, 2 deletions
createdb.sql
with
24 additions
and
2 deletions
createdb.sql
+
24
−
2
View file @
f9d21864
...
...
@@ -353,7 +353,7 @@ BEGIN
END
$$
DELIMITER
;
drop
procedure
if
exists
addToGroup
;
drop
procedure
if
exists
`
addToGroup
`
;
delimiter
$$
CREATE
PROCEDURE
addToGroup
(
IN
grapeID
varchar
(
40
))
...
...
@@ -374,7 +374,7 @@ select count(distinct volunteerID) *(SELECT ageGroup from Sessions where groupID
set
toad
=
@
maxstu
-
@
currentStu
;
-- toad reprisents how many students the program should add off the WaitList
-- the next loop adds a student to the group from the waitlist equal
-- to the amount of
-- to the amount of
spaces available
if
toad
is
not
null
and
toad
>
0
then
adding_loop
:
LOOP
SET
x
=
x
+
1
;
...
...
@@ -391,6 +391,10 @@ select count(distinct volunteerID) *(SELECT ageGroup from Sessions where groupID
END
IF
;
END
LOOP
adding_loop
;
end
if
;
select
*
from
WaitList
-- you should see that a number of students application should be successful
-- (if theres space) by dateremoved being null is they still are waiting or
-- todays date if they got added
END
$$
DELIMITER
;
...
...
@@ -424,7 +428,25 @@ BEGIN
END
$$
DELIMITER
;
-- under article 17 of the UK gdpr individuals
-- have the right to have personal data erased
-- next 3 functions handle deleting said data
drop
procedure
if
exists
EraseParent
;
delimiter
$$
CREATE
PROCEDURE
EraseParent
(
IN
email
varchar
(
320
),
IN
passw
varchar
(
70
))
-- removes children as well
-- we need emergency contact details in case of emergency
-- we are not a financial institution so we don't have a legal requirement
BEGIN
Delete
from
parents
where
ParentsID
=
md5
(
concat
(
email
,
passw
));
Delete
from
badgeawarded
where
awardedto
in
()
Delete
from
Students
where
parentsID
=
md5
(
concat
(
email
,
passw
));
END
$$
DELIMITER
;
drop
procedure
if
exists
updateSG
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment