Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
00e687e
Create README.md
Rhyava Jan 20, 2021
fc3015e
Aaron tests pushing files to repository. Probably delete later.
ahw0010 Feb 3, 2021
acbdb1b
and it's gone.
ahw0010 Feb 3, 2021
1514d01
lets try another branch?
ahw0010 Feb 3, 2021
1c61055
Adding a small quick guide to branching (mostly to prove to myself th…
ahw0010 Feb 3, 2021
1304d89
adding quick guide. Wow it really wont let you commit without a comment
ahw0010 Feb 3, 2021
90809ce
Update Employee.sql
Gbmeaper77 Feb 9, 2021
279d294
Update Product.sql
ahw0010 Feb 9, 2021
ca3b99a
Update Employee.sql
creighton1199 Feb 9, 2021
95d6ff7
Update Employee.sql
creighton1199 Feb 9, 2021
d60fe0c
Update Employee.sql
creighton1199 Feb 9, 2021
a32d6cd
Update Product.sql
ahw0010 Feb 9, 2021
32edc78
Added comment regarding EmployeeID potential resolution
Rhyava Feb 9, 2021
57ad322
Update Employee.sql
AlecAndrew Feb 9, 2021
02b435f
Update Employee.sql
IsogaiYugo Feb 11, 2021
8b3f436
Merge branch 'master' of https://github.com/csce3513ProjectGroup/Regi…
Rhyava Feb 16, 2021
2394464
modified password field from bytea datatype to character varying(256)
Rhyava Feb 16, 2021
0166596
added three employees, fixed some database consistency issues that cr…
Rhyava Feb 16, 2021
846f945
Merge branch 'Sprint2Starter' of https://github.com/csce3513ProjectGr…
Rhyava Feb 16, 2021
32422d5
Merge branch 'Sprint2StarterK' of https://github.com/csce3513ProjectG…
Rhyava Feb 16, 2021
d846c21
Updated manual employee creation code for accuracy
Rhyava Mar 29, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 28 additions & 3 deletions Employee.sql
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
CREATE TABLE employee (
id uuid NOT NULL DEFAULT gen_random_uuid(),
employeeid int NOT NULL DEFAULT(0),
employeeid character varying(5) NOT NULL DEFAULT(''), -- We think this has been limited to 5 numerical characters by switching to a character instead of an int
firstname character varying(128) NOT NULL DEFAULT(''),
lastname character varying(128) NOT NULL DEFAULT(''),
password bytea NOT NULL DEFAULT(''),
--password bytea NOT NULL DEFAULT(''), -- original line of code
password character varying(256) NOT NULL DEFAULT('a'), -- This reflects table on heroku 2/16/21 3:31pm
active boolean NOT NULL DEFAULT(FALSE),
classification int NOT NULL DEFAULT(0),
managerid uuid NOT NULL DEFAULT CAST('00000000-0000-0000-0000-000000000000' AS uuid),
Expand All @@ -23,13 +24,36 @@ CREATE INDEX ix_employee_employeeid
ON employee
USING btree(employeeid);

-- Adding Three Records to employee table
INSERT INTO employee (employeeid, firstname, lastname, classification, managerid, password) VALUES (
1 -- employeeid (5 characters)
, 'Antoni' -- first name
, 'Jones' -- last name
, 701 -- classification 2 is manager
, gen_random_uuid() -- managerid uuid
, 'a' -- password as character
);
INSERT INTO employee (employeeid, firstname, lastname, classification) VALUES (
2 -- employeeid (5 characters)
, 'Manny' -- first name
, 'Hustler' -- last name
, 101 -- classification 1 is cashier
);
INSERT INTO employee (employeeid, firstname, lastname, classification, managerid, password) VALUES (
3 -- employeeid (5 characters)
, 'Russell' -- first name
, 'Tover' -- last name
, 501 -- classification 1 is shift-manager
, gen_random_uuid() -- managerid uuid
, 'b' -- password as character
);
-----
CREATE TABLE activeuser (
id uuid NOT NULL DEFAULT gen_random_uuid(),
employeeid uuid NOT NULL,
name character varying(256) NOT NULL DEFAULT(''),
classification int NOT NULL DEFAULT(0),
sessionkey character varying (128) NOT NULL DEFAULT(''),
sessionkey character varying(128) NOT NULL DEFAULT(''), -- Removed a space after varying to fix an error
createdon timestamp without time zone NOT NULL DEFAULT now(),
CONSTRAINT activeuser_pkey PRIMARY KEY (id)
) WITH (
Expand All @@ -44,3 +68,4 @@ CREATE INDEX ix_activeuser_sessionkey
ON activeuser
USING btree(sessionkey);

-- commit to the same branch
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# RegisterApp-DataDefinition
SQL to create the backing database for the various server-side Register projects.
10 changes: 10 additions & 0 deletions branchingQuickGuide.TXT
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
List available branches (Local and remote): $ git branch -a
Switch active branch: $ git checkout <branchName>
Create new branch and switch to it: $ git checkout -b <branchName>
Pull specific branch contents to local machine: $ git pull -u origin <branchName>
push to specific branch: $ git push -u origin <branchName>
delete a branch (locally and remotely): $ git branch -d <branchName> $ git push origin :<branchName>

/* * Without specifying branch for push or pull working branch will be used.
* To delete contents of a branch you can simply delete files from your local copy,
add the file to list of commits, then push the branch to remote.