diff --git a/Employee.sql b/Employee.sql index 9be330b..bcc85fd 100644 --- a/Employee.sql +++ b/Employee.sql @@ -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), @@ -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 ( @@ -44,3 +68,4 @@ CREATE INDEX ix_activeuser_sessionkey ON activeuser USING btree(sessionkey); +-- commit to the same branch diff --git a/README.md b/README.md new file mode 100644 index 0000000..bd965f6 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# RegisterApp-DataDefinition +SQL to create the backing database for the various server-side Register projects. diff --git a/branchingQuickGuide.TXT b/branchingQuickGuide.TXT new file mode 100644 index 0000000..546dedc --- /dev/null +++ b/branchingQuickGuide.TXT @@ -0,0 +1,10 @@ +List available branches (Local and remote): $ git branch -a +Switch active branch: $ git checkout +Create new branch and switch to it: $ git checkout -b +Pull specific branch contents to local machine: $ git pull -u origin +push to specific branch: $ git push -u origin +delete a branch (locally and remotely): $ git branch -d $ git push origin : + +/* * 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. \ No newline at end of file