-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
105 additions
and
16 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
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,4 @@ | ||
ALTER TABLE omicron.public.dataset | ||
ADD COLUMN IF NOT EXISTS quota INT8, | ||
ADD COLUMN IF NOT EXISTS reservation INT8, | ||
ADD COLUMN IF NOT EXISTS compression TEXT |
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,4 @@ | ||
CREATE TYPE IF NOT EXISTS omicron.public.bp_dataset_disposition AS ENUM ( | ||
'in_service', | ||
'expunged' | ||
) |
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 @@ | ||
-- description of a collection of omicron datasets stored in a blueprint | ||
CREATE TABLE IF NOT EXISTS omicron.public.bp_sled_omicron_datasets ( | ||
-- foreign key into the `blueprint` table | ||
blueprint_id UUID NOT NULL, | ||
sled_id UUID NOT NULL, | ||
generation INT8 NOT NULL, | ||
|
||
PRIMARY KEY (blueprint_id, sled_id) | ||
) |
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,35 @@ | ||
-- description of an omicron dataset specified in a blueprint. | ||
CREATE TABLE IF NOT EXISTS omicron.public.bp_omicron_dataset ( | ||
-- foreign key into the `blueprint` table | ||
blueprint_id UUID NOT NULL, | ||
sled_id UUID NOT NULL, | ||
id UUID NOT NULL, | ||
|
||
-- Dataset disposition | ||
disposition omicron.public.bp_dataset_disposition NOT NULL, | ||
|
||
pool_id UUID NOT NULL, | ||
kind omicron.public.dataset_kind NOT NULL, | ||
-- Only valid if kind = zone | ||
zone_name TEXT, | ||
|
||
-- Only valid if kind = crucible | ||
ip INET, | ||
port INT4 CHECK (port BETWEEN 0 AND 65535), | ||
|
||
quota INT8, | ||
reservation INT8, | ||
compression TEXT, | ||
|
||
CONSTRAINT zone_name_for_zone_kind CHECK ( | ||
(kind != 'zone') OR | ||
(kind = 'zone' AND zone_name IS NOT NULL) | ||
), | ||
|
||
CONSTRAINT ip_and_port_set_for_crucible CHECK ( | ||
(kind != 'crucible') OR | ||
(kind = 'crucible' AND ip IS NOT NULL and port IS NOT NULL) | ||
), | ||
|
||
PRIMARY KEY (blueprint_id, id) | ||
) |
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