-
Notifications
You must be signed in to change notification settings - Fork 44
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
1 parent
e0c203b
commit 3632a26
Showing
3 changed files
with
43 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[service] | ||
name = "db-servers" | ||
|
||
[runtime] | ||
kind = "crdb" | ||
|
||
[database] |
Empty file.
36 changes: 36 additions & 0 deletions
36
svc/pkg/servers/db/servers/migrations/20240501133910_init.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,36 @@ | ||
CREATE TABLE servers ( | ||
server_id UUID PRIMARY KEY, | ||
datacenter_id UUID NOT NULL REFERENCES datacenters (datacenter_id), | ||
pool_type INT NOT NULL, -- rivet.backend.cluster.PoolType | ||
|
||
-- Null until actual server is provisioned | ||
provider_server_id TEXT, | ||
provider_hardware TEXT, | ||
vlan_ip INET, | ||
network_idx INT, | ||
public_ip INET, | ||
|
||
-- Null until nomad node successfully registers | ||
nomad_node_id TEXT, | ||
|
||
create_ts INT NOT NULL, | ||
provision_complete_ts INT, | ||
install_complete_ts INT, | ||
nomad_join_ts INT, | ||
-- Null if not draining | ||
drain_ts INT, | ||
drain_complete_ts INT, | ||
-- When the server was marked to be deleted by rivet | ||
cloud_destroy_ts INT, | ||
taint_ts INT | ||
); | ||
|
||
|
||
CREATE TABLE docker_images ( | ||
image_id UUID PRIMARY KEY, | ||
image_name TEXT NOT NULL, | ||
image_tag TEXT NOT NULL, | ||
image_digest TEXT NOT NULL, | ||
image_size INT NOT NULL, | ||
image_created_ts INT NOT NULL | ||
); |