-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add round number to the data model (#58)
Add a new column to `retrievals` table: ``` created_at_round BIGINT NOT NULL ``` Add a new column to `retrieval_results` table: ``` completed_at_round BIGINT NOT NULL ``` Rework the HTTP handler and the test suite to fill these new columns, using a hard-coded round number (for now). Signed-off-by: Miroslav Bajtoš <[email protected]>
- Loading branch information
Showing
4 changed files
with
47 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- bigint uses 64 bits, the upper limit is +9223372036854775807 | ||
-- Postgres and SQL do not support unsigned integers | ||
ALTER TABLE retrievals ADD COLUMN created_at_round BIGINT; | ||
UPDATE retrievals SET created_at_round = 0; | ||
ALTER TABLE retrievals ALTER COLUMN created_at_round SET NOT NULL; | ||
|
||
ALTER TABLE retrieval_results ADD COLUMN completed_at_round BIGINT; | ||
UPDATE retrieval_results SET completed_at_round = 0; | ||
ALTER TABLE retrieval_results ALTER COLUMN completed_at_round SET NOT NULL; |
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