From 00e687e01b61c8204f625f475e5b04171fd82571 Mon Sep 17 00:00:00 2001 From: rhyava <47902514+Rhyava@users.noreply.github.com> Date: Wed, 20 Jan 2021 13:34:09 -0600 Subject: [PATCH 01/18] Create README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 README.md 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. From fc3015e5a963cefe02831a1e65bbfd7ab469919d Mon Sep 17 00:00:00 2001 From: Aaron Date: Wed, 3 Feb 2021 13:07:57 -0600 Subject: [PATCH 02/18] Aaron tests pushing files to repository. Probably delete later. --- canIPushToTheRepository.TXT | 1 + 1 file changed, 1 insertion(+) create mode 100644 canIPushToTheRepository.TXT diff --git a/canIPushToTheRepository.TXT b/canIPushToTheRepository.TXT new file mode 100644 index 0000000..4e13bef --- /dev/null +++ b/canIPushToTheRepository.TXT @@ -0,0 +1 @@ +Yes I can (please let me have this)! \ No newline at end of file From acbdb1b714fa17066219ea85fff3a9d3c850f28f Mon Sep 17 00:00:00 2001 From: Aaron Date: Wed, 3 Feb 2021 13:12:05 -0600 Subject: [PATCH 03/18] and it's gone. --- canIPushToTheRepository.TXT | 1 - 1 file changed, 1 deletion(-) delete mode 100644 canIPushToTheRepository.TXT diff --git a/canIPushToTheRepository.TXT b/canIPushToTheRepository.TXT deleted file mode 100644 index 4e13bef..0000000 --- a/canIPushToTheRepository.TXT +++ /dev/null @@ -1 +0,0 @@ -Yes I can (please let me have this)! \ No newline at end of file From 1514d0150b54e308bb1e46d79a48d319f6d1d517 Mon Sep 17 00:00:00 2001 From: Aaron Date: Wed, 3 Feb 2021 13:13:30 -0600 Subject: [PATCH 04/18] lets try another branch? --- nowWhatHappensIfIDoThis.TXT | 1 + 1 file changed, 1 insertion(+) create mode 100644 nowWhatHappensIfIDoThis.TXT diff --git a/nowWhatHappensIfIDoThis.TXT b/nowWhatHappensIfIDoThis.TXT new file mode 100644 index 0000000..84610b9 --- /dev/null +++ b/nowWhatHappensIfIDoThis.TXT @@ -0,0 +1 @@ +lets find out! \ No newline at end of file From 1c6105529e9ab6549e82a28bbec43de26e9b0612 Mon Sep 17 00:00:00 2001 From: Aaron Date: Wed, 3 Feb 2021 13:36:30 -0600 Subject: [PATCH 05/18] Adding a small quick guide to branching (mostly to prove to myself that I can). --- branchingQuickGuide.TXT | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 branchingQuickGuide.TXT 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 From 1304d898693e7db08ae56a8d2728eb69ec047dd8 Mon Sep 17 00:00:00 2001 From: Aaron Date: Wed, 3 Feb 2021 13:37:24 -0600 Subject: [PATCH 06/18] adding quick guide. Wow it really wont let you commit without a comment --- nowWhatHappensIfIDoThis.TXT | 1 - 1 file changed, 1 deletion(-) delete mode 100644 nowWhatHappensIfIDoThis.TXT diff --git a/nowWhatHappensIfIDoThis.TXT b/nowWhatHappensIfIDoThis.TXT deleted file mode 100644 index 84610b9..0000000 --- a/nowWhatHappensIfIDoThis.TXT +++ /dev/null @@ -1 +0,0 @@ -lets find out! \ No newline at end of file From 90809ce66fc512d3fb4cb8faa511c89e09eb3502 Mon Sep 17 00:00:00 2001 From: Gbmeaper77 <77367006+Gbmeaper77@users.noreply.github.com> Date: Tue, 9 Feb 2021 16:31:32 -0600 Subject: [PATCH 07/18] Update Employee.sql --- Employee.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Employee.sql b/Employee.sql index 9be330b..b014ead 100644 --- a/Employee.sql +++ b/Employee.sql @@ -1,6 +1,6 @@ CREATE TABLE employee ( id uuid NOT NULL DEFAULT gen_random_uuid(), - employeeid int NOT NULL DEFAULT(0), + employeeid int varying(5) NOT NULL DEFAULT(0), firstname character varying(128) NOT NULL DEFAULT(''), lastname character varying(128) NOT NULL DEFAULT(''), password bytea NOT NULL DEFAULT(''), From 279d29452a09cb232fbe14fe0d83dde11b093447 Mon Sep 17 00:00:00 2001 From: ahw0010 <77364083+ahw0010@users.noreply.github.com> Date: Tue, 9 Feb 2021 16:37:12 -0600 Subject: [PATCH 08/18] Update Product.sql --- Product.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Product.sql b/Product.sql index f2a4495..ef30945 100644 --- a/Product.sql +++ b/Product.sql @@ -4,7 +4,7 @@ CREATE EXTENSION pgcrypto; --Allows PostgreSQL to understand UUIDs. Only have to CREATE TABLE product ( id uuid NOT NULL DEFAULT gen_random_uuid(), --The record ID. Stored in the edu.uark.dataaccess.entities:BaseEntity#id property. See also the named constant defined in edu.uark.dataaccess.entities:BaseFieldNames that is used for Java <-> SQL mappings. - lookupcode character varying(32) NOT NULL DEFAULT(''), --Stored in the edu.uark.models.entities:ProductEntity#lookupCode property. See also the named constant defined in edu.uark.models.entities.fieldnames:ProductFieldNames that is used for Java <-> SQL mappings. + lookupcode character varying(3) NOT NULL DEFAULT(''), --Stored in the edu.uark.models.entities:ProductEntity#lookupCode property. See also the named constant defined in edu.uark.models.entities.fieldnames:ProductFieldNames that is used for Java <-> SQL mappings. count int NOT NULL DEFAULT(0), --Stored in the edu.uark.models.entities:ProductEntity#count property. See also the named constant defined in edu.uark.models.entities.fieldnames:ProductFieldNames that is used for Java <-> SQL mappings. createdon timestamp without time zone NOT NULL DEFAULT now(), --Stored in the edu.uark.dataaccess.entities:BaseEntity#createdOn property. See also the named constant defined in edu.uark.dataaccess.entities:BaseFieldNames that is used for Java <-> SQL mappings. CONSTRAINT product_pkey PRIMARY KEY (id) From ca3b99a0c19f47b2a854e562ccb0f578fe0b928b Mon Sep 17 00:00:00 2001 From: creighton1199 <77364452+creighton1199@users.noreply.github.com> Date: Tue, 9 Feb 2021 16:41:40 -0600 Subject: [PATCH 09/18] Update Employee.sql --- Employee.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Employee.sql b/Employee.sql index b014ead..3e4a151 100644 --- a/Employee.sql +++ b/Employee.sql @@ -1,6 +1,6 @@ CREATE TABLE employee ( id uuid NOT NULL DEFAULT gen_random_uuid(), - employeeid int varying(5) NOT NULL DEFAULT(0), + employeeid charachter varying(5) NOT NULL DEFAULT(0), firstname character varying(128) NOT NULL DEFAULT(''), lastname character varying(128) NOT NULL DEFAULT(''), password bytea NOT NULL DEFAULT(''), From 95d6ff7ed9370819c028f2a5a2a2e44bc8384faa Mon Sep 17 00:00:00 2001 From: creighton1199 <77364452+creighton1199@users.noreply.github.com> Date: Tue, 9 Feb 2021 16:41:55 -0600 Subject: [PATCH 10/18] Update Employee.sql --- Employee.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Employee.sql b/Employee.sql index 3e4a151..b4f14af 100644 --- a/Employee.sql +++ b/Employee.sql @@ -1,6 +1,6 @@ CREATE TABLE employee ( id uuid NOT NULL DEFAULT gen_random_uuid(), - employeeid charachter varying(5) NOT NULL DEFAULT(0), + employeeid character varying(5) NOT NULL DEFAULT(0), firstname character varying(128) NOT NULL DEFAULT(''), lastname character varying(128) NOT NULL DEFAULT(''), password bytea NOT NULL DEFAULT(''), From d60fe0c5b59d645efceb61b2bb93f1ad2644f60e Mon Sep 17 00:00:00 2001 From: creighton1199 <77364452+creighton1199@users.noreply.github.com> Date: Tue, 9 Feb 2021 16:44:09 -0600 Subject: [PATCH 11/18] Update Employee.sql --- Employee.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Employee.sql b/Employee.sql index b4f14af..456011d 100644 --- a/Employee.sql +++ b/Employee.sql @@ -1,6 +1,6 @@ CREATE TABLE employee ( id uuid NOT NULL DEFAULT gen_random_uuid(), - employeeid character varying(5) NOT NULL DEFAULT(0), + employeeid character varying(5) NOT NULL DEFAULT(''), firstname character varying(128) NOT NULL DEFAULT(''), lastname character varying(128) NOT NULL DEFAULT(''), password bytea NOT NULL DEFAULT(''), From a32d6cd3c1df685e640d8e5dc14611575bb62d9e Mon Sep 17 00:00:00 2001 From: ahw0010 <77364083+ahw0010@users.noreply.github.com> Date: Tue, 9 Feb 2021 16:51:56 -0600 Subject: [PATCH 12/18] Update Product.sql --- Product.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Product.sql b/Product.sql index ef30945..f2a4495 100644 --- a/Product.sql +++ b/Product.sql @@ -4,7 +4,7 @@ CREATE EXTENSION pgcrypto; --Allows PostgreSQL to understand UUIDs. Only have to CREATE TABLE product ( id uuid NOT NULL DEFAULT gen_random_uuid(), --The record ID. Stored in the edu.uark.dataaccess.entities:BaseEntity#id property. See also the named constant defined in edu.uark.dataaccess.entities:BaseFieldNames that is used for Java <-> SQL mappings. - lookupcode character varying(3) NOT NULL DEFAULT(''), --Stored in the edu.uark.models.entities:ProductEntity#lookupCode property. See also the named constant defined in edu.uark.models.entities.fieldnames:ProductFieldNames that is used for Java <-> SQL mappings. + lookupcode character varying(32) NOT NULL DEFAULT(''), --Stored in the edu.uark.models.entities:ProductEntity#lookupCode property. See also the named constant defined in edu.uark.models.entities.fieldnames:ProductFieldNames that is used for Java <-> SQL mappings. count int NOT NULL DEFAULT(0), --Stored in the edu.uark.models.entities:ProductEntity#count property. See also the named constant defined in edu.uark.models.entities.fieldnames:ProductFieldNames that is used for Java <-> SQL mappings. createdon timestamp without time zone NOT NULL DEFAULT now(), --Stored in the edu.uark.dataaccess.entities:BaseEntity#createdOn property. See also the named constant defined in edu.uark.dataaccess.entities:BaseFieldNames that is used for Java <-> SQL mappings. CONSTRAINT product_pkey PRIMARY KEY (id) From 32edc78dbc5b6763d3643851124f150f62520c6f Mon Sep 17 00:00:00 2001 From: rhyava <47902514+Rhyava@users.noreply.github.com> Date: Tue, 9 Feb 2021 16:55:37 -0600 Subject: [PATCH 13/18] Added comment regarding EmployeeID potential resolution --- Employee.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Employee.sql b/Employee.sql index 456011d..ef38d6e 100644 --- a/Employee.sql +++ b/Employee.sql @@ -1,6 +1,6 @@ CREATE TABLE employee ( id uuid NOT NULL DEFAULT gen_random_uuid(), - employeeid character varying(5) NOT NULL DEFAULT(''), + 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(''), From 57ad322f08db00f2e92181445626fcf71d32d278 Mon Sep 17 00:00:00 2001 From: AlecAndrew Date: Tue, 9 Feb 2021 17:18:17 -0600 Subject: [PATCH 14/18] Update Employee.sql --- Employee.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Employee.sql b/Employee.sql index ef38d6e..2a088f2 100644 --- a/Employee.sql +++ b/Employee.sql @@ -29,7 +29,7 @@ CREATE TABLE activeuser ( 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 ( From 02b435f6467fe318c661d4d4cac1c3af33fc6cab Mon Sep 17 00:00:00 2001 From: IsogaiYugo <41026474+IsogaiYugo@users.noreply.github.com> Date: Fri, 12 Feb 2021 05:40:32 +0900 Subject: [PATCH 15/18] Update Employee.sql commit the same branch --- Employee.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/Employee.sql b/Employee.sql index 2a088f2..960975b 100644 --- a/Employee.sql +++ b/Employee.sql @@ -44,3 +44,4 @@ CREATE INDEX ix_activeuser_sessionkey ON activeuser USING btree(sessionkey); +-- commit to the same branch From 23944642ad34e37e2983223719a77e8873d78c47 Mon Sep 17 00:00:00 2001 From: rhyava <47902514+Rhyava@users.noreply.github.com> Date: Tue, 16 Feb 2021 15:38:25 -0600 Subject: [PATCH 16/18] modified password field from bytea datatype to character varying(256) --- Employee.sql | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Employee.sql b/Employee.sql index ef38d6e..0effbcb 100644 --- a/Employee.sql +++ b/Employee.sql @@ -3,7 +3,8 @@ CREATE TABLE employee ( 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,6 +24,24 @@ CREATE INDEX ix_employee_employeeid ON employee USING btree(employeeid); +-- Adding Three Records to employee table +INSERT INTO employee (id, employeeid, firstname, lastname, classification, managerid, password) VALUES ( + gen_random_uuid() + , 'A0001' -- employeeid (5 characters) + , 'Manny' -- first name + , 'Hustler' -- last name + , 1 -- classification 1 is cashier + , gen_random_uuid() -- managerid uuid + , CAST(0001 AS bytea) -- password in bytea (binary) +); +INSERT INTO employee (id, employeeid, firstname, lastname, classification) VALUES ( + gen_random_uuid() + , 'M0001' -- employeeid (5 characters) + , 'Antoni' -- first name + , 'Jones' -- last name + , 2 -- classification 2 is manager +); + ----- CREATE TABLE activeuser ( id uuid NOT NULL DEFAULT gen_random_uuid(), From 01665967973a0eacb790d34d3276d6f42d4700c0 Mon Sep 17 00:00:00 2001 From: rhyava <47902514+Rhyava@users.noreply.github.com> Date: Tue, 16 Feb 2021 16:53:15 -0600 Subject: [PATCH 17/18] added three employees, fixed some database consistency issues that croped up due to inattention --- Employee.sql | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/Employee.sql b/Employee.sql index 0effbcb..b5b5285 100644 --- a/Employee.sql +++ b/Employee.sql @@ -27,21 +27,29 @@ CREATE INDEX ix_employee_employeeid -- Adding Three Records to employee table INSERT INTO employee (id, employeeid, firstname, lastname, classification, managerid, password) VALUES ( gen_random_uuid() - , 'A0001' -- employeeid (5 characters) - , 'Manny' -- first name - , 'Hustler' -- last name - , 1 -- classification 1 is cashier + , 'M0001' -- employeeid (5 characters) + , 'Antoni' -- first name + , 'Jones' -- last name + , 2 -- classification 2 is manager , gen_random_uuid() -- managerid uuid - , CAST(0001 AS bytea) -- password in bytea (binary) + , 'a' -- password as character ); INSERT INTO employee (id, employeeid, firstname, lastname, classification) VALUES ( gen_random_uuid() , 'M0001' -- employeeid (5 characters) - , 'Antoni' -- first name - , 'Jones' -- last name - , 2 -- classification 2 is manager + , 'Manny' -- first name + , 'Hustler' -- last name + , 1 -- classification 1 is cashier +); +INSERT INTO employee (id, employeeid, firstname, lastname, classification, managerid, password) VALUES ( + gen_random_uuid() + , 'S0001' -- employeeid (5 characters) + , 'Russell' -- first name + , 'Tover' -- last name + , 3 -- 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(), From d846c2186ec21a748ded30b3c663081c9b7cfa1b Mon Sep 17 00:00:00 2001 From: rhyava <47902514+Rhyava@users.noreply.github.com> Date: Mon, 29 Mar 2021 15:54:04 -0500 Subject: [PATCH 18/18] Updated manual employee creation code for accuracy --- Employee.sql | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/Employee.sql b/Employee.sql index 37a41fb..bcc85fd 100644 --- a/Employee.sql +++ b/Employee.sql @@ -25,28 +25,25 @@ CREATE INDEX ix_employee_employeeid USING btree(employeeid); -- Adding Three Records to employee table -INSERT INTO employee (id, employeeid, firstname, lastname, classification, managerid, password) VALUES ( - gen_random_uuid() - , 'M0001' -- employeeid (5 characters) +INSERT INTO employee (employeeid, firstname, lastname, classification, managerid, password) VALUES ( + 1 -- employeeid (5 characters) , 'Antoni' -- first name , 'Jones' -- last name - , 2 -- classification 2 is manager + , 701 -- classification 2 is manager , gen_random_uuid() -- managerid uuid , 'a' -- password as character ); -INSERT INTO employee (id, employeeid, firstname, lastname, classification) VALUES ( - gen_random_uuid() - , 'M0001' -- employeeid (5 characters) +INSERT INTO employee (employeeid, firstname, lastname, classification) VALUES ( + 2 -- employeeid (5 characters) , 'Manny' -- first name , 'Hustler' -- last name - , 1 -- classification 1 is cashier + , 101 -- classification 1 is cashier ); -INSERT INTO employee (id, employeeid, firstname, lastname, classification, managerid, password) VALUES ( - gen_random_uuid() - , 'S0001' -- employeeid (5 characters) +INSERT INTO employee (employeeid, firstname, lastname, classification, managerid, password) VALUES ( + 3 -- employeeid (5 characters) , 'Russell' -- first name , 'Tover' -- last name - , 3 -- classification 1 is shift-manager + , 501 -- classification 1 is shift-manager , gen_random_uuid() -- managerid uuid , 'b' -- password as character );