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
58387758
Commit
58387758
authored
1 year ago
by
Finlay White
Browse files
Options
Downloads
Patches
Plain Diff
session history
parent
beffe7d3
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
+15
-4
15 additions, 4 deletions
createdb.sql
with
15 additions
and
4 deletions
createdb.sql
+
15
−
4
View file @
58387758
...
...
@@ -51,6 +51,7 @@ CREATE TABLE `Sessions`(
leaderID
varchar
(
40
),
location
varchar
(
55
),
duration
int
(
10
),
dayofweek
int
(
2
),
FOREIGN
KEY
(
leaderID
)
REFERENCES
Volunteers
(
VolunteerID
),
maxAttendees
int
(
10
),
groupid
varchar
(
40
),
...
...
@@ -67,9 +68,12 @@ CREATE TABLE `BadgeAwarded`(
awardedID
int
(
20
)
not
null
unique
,
primary
key
(
awardedID
),
awardedto
varchar
(
40
),
evidence
varchar
(
1000
),
awardedby
varchar
(
40
),
Badgeawarded
varchar
(
40
),
dateAwarded
date
,
isAwarded
boolean
,
-- isAwarded is to review applications
FOREIGN
KEY
(
awardedto
)
REFERENCES
Students
(
studentID
),
FOREIGN
KEY
(
awardedby
)
REFERENCES
Volunteers
(
VolunteerID
),
FOREIGN
KEY
(
Badgeawarded
)
REFERENCES
Badge
(
BadgeID
)
...
...
@@ -88,7 +92,14 @@ CREATE TABLE `StudentAttendance`(
FOREIGN
KEY
(
studentID
)
REFERENCES
Students
(
studentID
),
FOREIGN
KEY
(
sessionID
)
REFERENCES
Sessions
(
SessionID
)
);
Alter
table
`Badge`
ADD
FOREIGN
KEY
(
RequirementID
)
REFERENCES
Badgereqs
(
RequirementID
);
CREATE
TABLE
`SessionHistory`
(
SessionHistoryID
varchar
(
40
),
heldOn
date
,
sessionID
varchar
(
40
),
reviewOfProgression
varchar
(
400
),
reviewOfStaffSafety
varchar
(
400
),
FOREIGN
KEY
(
sessionID
)
REFERENCES
Sessions
(
SessionID
)
);
...
...
@@ -194,9 +205,9 @@ DELIMITER ;
call
addParent
(
"jeff"
,
"Jones"
,
"email@realemail.com"
,
"veryStrongPassw0rd"
,
02358254
);
call
addStudent
(
"bobby"
,
"jones"
,
'2012-2-11'
,
'8e301d6e513165a9c0b6b9a2b10c8305'
,
"EXTRASTRONGPASSWORD"
);
call
addBadge
(
"real badge"
,
"this is a totally real badge"
);
call
addStudent
(
"timothy"
,
"jones"
,
'2002-2-11'
,
'8e301d6e513165a9c0b6b9a2b10c8305'
,
"EXTR
A
STRONGPASSWORD"
);
call
addStudent
(
"timothy"
,
"jones"
,
'2002-2-11'
,
'8e301d6e513165a9c0b6b9a2b10c8305'
,
"EXTR
EMELY
STRONGPASSWORD"
);
select
*
from
badge
;
-- select * from parents;
``
select
*
from
students
;
-- select * from parents;
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