-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add check constraints for container.version_ttl_seconds and blobs.size (
- Loading branch information
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
...ata/postgresql/migrations/sql/0007_ensure_containers_versions_ttl_and_blobs_size.down.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,11 @@ | ||
BEGIN; | ||
|
||
ALTER TABLE blobs | ||
DROP CONSTRAINT size_range | ||
; | ||
|
||
ALTER TABLE containers | ||
DROP CONSTRAINT version_ttl_seconds_range | ||
; | ||
|
||
COMMIT; |
11 changes: 11 additions & 0 deletions
11
...adata/postgresql/migrations/sql/0007_ensure_containers_versions_ttl_and_blobs_size.up.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,11 @@ | ||
BEGIN; | ||
|
||
ALTER TABLE blobs | ||
ADD CONSTRAINT size_range CHECK (size >= 0) | ||
; | ||
|
||
ALTER TABLE containers | ||
ADD CONSTRAINT version_ttl_seconds_range CHECK (version_ttl_seconds >= -1) | ||
; | ||
|
||
COMMIT; |