Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cmpt-370-group-project-group26
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Eyan Cunningham (esc568)
cmpt-370-group-project-group26
Commits
bb16f889
Commit
bb16f889
authored
2 years ago
by
Rafi Zereselasie (raz070)
Browse files
Options
Downloads
Patches
Plain Diff
New table in the database that hold positions and wages for those positions.
parent
d8f3dbc8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ScheduleApp.sql
+16
-5
16 additions, 5 deletions
ScheduleApp.sql
with
16 additions
and
5 deletions
ScheduleApp.sql
+
16
−
5
View file @
bb16f889
...
@@ -12,7 +12,7 @@ create table Employees(
...
@@ -12,7 +12,7 @@ create table Employees(
primary
key
(
employee_ID
)
primary
key
(
employee_ID
)
);
);
#
INSERT
INTO
Employees
(
first_name
,
last_name
,
isManager
,
email
,
phoneNumber
,
wage
)
VALUES
(
'Admin'
,
'Admin'
,
true
,
'none'
,
'0000000000'
,
0
.
0
);
INSERT
INTO
Employees
(
first_name
,
last_name
,
isManager
,
email
,
phoneNumber
,
wage
)
VALUES
(
'Admin'
,
'Admin'
,
true
,
'none'
,
'0000000000'
,
0
.
0
);
create
table
Shifts
(
create
table
Shifts
(
shift_id
INT
NOT
NULL
auto_increment
UNIQUE
,
shift_id
INT
NOT
NULL
auto_increment
UNIQUE
,
...
@@ -20,7 +20,8 @@ create table Shifts(
...
@@ -20,7 +20,8 @@ create table Shifts(
start_time
INT
,
start_time
INT
,
end_time
INT
,
end_time
INT
,
employee_ID
INT
,
employee_ID
INT
,
availability
boolean
,
position
varchar
(
20
),
availability
boolean
default
false
,
PRIMARY
KEY
(
shift_id
),
PRIMARY
KEY
(
shift_id
),
FOREIGN
KEY
(
employee_ID
)
REFERENCES
Employees
(
employee_ID
)
FOREIGN
KEY
(
employee_ID
)
REFERENCES
Employees
(
employee_ID
)
);
);
...
@@ -57,18 +58,28 @@ create table Availabilities(
...
@@ -57,18 +58,28 @@ create table Availabilities(
foreign
key
(
employeeID
)
references
Employees
(
employee_ID
)
foreign
key
(
employeeID
)
references
Employees
(
employee_ID
)
);
);
create
table
Positions
(
ID
int
not
null
auto_increment
unique
,
position
varchar
(
20
)
not
null
unique
,
wage
float
not
null
,
primary
key
(
position
)
);
insert
into
Positions
(
position
,
wage
)
values
(
"dishwasher"
,
12
.
50
);
s
ele
ct
*
from
Employees
;
d
ele
te
from
Positions
where
position
=
'dishwasher'
;
select
*
from
TimeOff
;
select
*
from
Positions
;
select
*
from
Employees
;
drop
table
Employees
;
drop
table
Employees
;
drop
database
ScheduleApp
;
drop
database
ScheduleApp
;
update
Shifts
set
availability
=
true
where
shift_id
=
5
;
insert
into
TimeOff
(
employeeID
,
startDate
,
endDate
,
approved
,
reason
)
values
(
3
,
"2022-03-17"
,
"2022-03-17"
,
true
,
"Vacation"
);
insert
into
TimeOff
(
employeeID
,
startDate
,
endDate
,
approved
,
reason
)
values
(
3
,
"2022-03-17"
,
"2022-03-17"
,
true
,
"Vacation"
);
update
TimeOff
set
approved
=
true
where
ID
=
3
update
TimeOff
set
approved
=
true
where
ID
=
3
...
...
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