-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* (no verify) fresh branch with only system intake(no verify) fresh branch with only system intake(no verify) fresh branch with only system intake(no verify) fresh branch with only system intake(no verify) fresh branch with only system intake(no verify) fresh branch with only system intake(no verify) fresh branch with only system intake(no verify) fresh branch with only system intake(no verify) fresh branch with only system intake * (no-verify) update comment * finish up auth functions * update test * remove double intellisense * fix bug in canCreate * give test user a role * use const for role in test * check err no rows * naming * all three validators share similar input signature and same return signature
- Loading branch information
1 parent
1e0c446
commit 877a6dd
Showing
16 changed files
with
328 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CREATE TYPE document_uploader_role AS ENUM ('REQUESTER', 'ADMIN'); | ||
|
||
-- add column without NOT NULL | ||
ALTER TABLE IF EXISTS system_intake_documents | ||
ADD COLUMN IF NOT EXISTS uploader_role document_uploader_role; | ||
-- update all rows | ||
UPDATE system_intake_documents | ||
SET uploader_role = 'REQUESTER'; | ||
-- add NOT NULL for new rows | ||
ALTER TABLE IF EXISTS system_intake_documents | ||
ALTER COLUMN uploader_role SET NOT NULL; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
INSERT INTO system_intake_documents (id, | ||
system_intake_id, | ||
file_name, | ||
document_type, | ||
other_type, | ||
bucket, | ||
s3_key, | ||
created_by, | ||
modified_by, | ||
uploader_role) | ||
VALUES (:id, | ||
:system_intake_id, | ||
:file_name, | ||
:document_type, | ||
:other_type, | ||
:bucket, | ||
:s3_key, | ||
:created_by, | ||
:modified_by, | ||
:uploader_role) | ||
RETURNING | ||
id, | ||
system_intake_id, | ||
file_name, | ||
document_type, | ||
other_type, | ||
bucket, | ||
s3_key, | ||
created_by, | ||
created_at, | ||
modified_by, | ||
modified_at, | ||
uploader_role; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
DELETE | ||
FROM system_intake_documents | ||
WHERE id = :id | ||
RETURNING | ||
id, | ||
system_intake_id, | ||
file_name, | ||
document_type, | ||
other_type, | ||
bucket, | ||
s3_key, | ||
created_by, | ||
created_at, | ||
modified_by, | ||
modified_at, | ||
uploader_role; |
Oops, something went wrong.