-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: run background task to upload images of submission to s3
- Loading branch information
Showing
6 changed files
with
174 additions
and
2 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
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
17 changes: 17 additions & 0 deletions
17
src/backend/migrations/006-create-submission-photos-table.sql
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,17 @@ | ||
-- ## Migration to: | ||
-- * Create submission_photos table | ||
|
||
-- Start a transaction | ||
BEGIN; | ||
|
||
CREATE TABLE submission_photos ( | ||
id SERIAL PRIMARY KEY, | ||
project_id INTEGER NOT NULL, | ||
task_id INTEGER NOT NULL, | ||
submission_id VARCHAR NOT NULL, | ||
s3_path VARCHAR NOT NULL | ||
); | ||
ALTER TABLE public.submission_photos OWNER TO fmtm; | ||
|
||
-- Commit the transaction | ||
COMMIT; |
10 changes: 10 additions & 0 deletions
10
src/backend/migrations/revert/006-create-submission-photos-table.sql
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,10 @@ | ||
-- ## Revert Migration to: | ||
-- * Drop submission_photos table | ||
|
||
-- Start a transaction | ||
BEGIN; | ||
|
||
DROP TABLE IF EXISTS public.submission_photos; | ||
|
||
-- Commit the transaction | ||
COMMIT; |