2020-01-09 20:23:47 +00:00
|
|
|
//lint:file-ignore * generated file
|
|
|
|
// AUTOGENERATED BY storj.io/storj/storagenode/storagenodedb/schemagen.go
|
|
|
|
// DO NOT EDIT
|
|
|
|
|
|
|
|
package storagenodedb
|
|
|
|
|
2021-04-23 10:52:40 +01:00
|
|
|
import "storj.io/private/dbutil/dbschema"
|
2020-01-09 20:23:47 +00:00
|
|
|
|
|
|
|
func Schema() map[string]*dbschema.Schema {
|
|
|
|
return map[string]*dbschema.Schema{
|
2022-03-31 08:55:19 +01:00
|
|
|
"bandwidth": {
|
2020-01-09 20:23:47 +00:00
|
|
|
Tables: []*dbschema.Table{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "bandwidth_usage",
|
|
|
|
Columns: []*dbschema.Column{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "action",
|
|
|
|
Type: "INTEGER",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "amount",
|
|
|
|
Type: "BIGINT",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "created_at",
|
|
|
|
Type: "TIMESTAMP",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "satellite_id",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "bandwidth_usage_rollups",
|
|
|
|
PrimaryKey: []string{"action", "interval_start", "satellite_id"},
|
|
|
|
Columns: []*dbschema.Column{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "action",
|
|
|
|
Type: "INTEGER",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "amount",
|
|
|
|
Type: "BIGINT",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "interval_start",
|
|
|
|
Type: "TIMESTAMP",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "satellite_id",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Indexes: []*dbschema.Index{
|
2022-03-31 08:55:19 +01:00
|
|
|
{Name: "idx_bandwidth_usage_created", Table: "bandwidth_usage", Columns: []string{"created_at"}, Unique: false, Partial: ""},
|
|
|
|
{Name: "idx_bandwidth_usage_satellite", Table: "bandwidth_usage", Columns: []string{"satellite_id"}, Unique: false, Partial: ""},
|
2020-01-09 20:23:47 +00:00
|
|
|
},
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
"heldamount": {
|
2020-03-12 14:42:01 +00:00
|
|
|
Tables: []*dbschema.Table{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-06-24 18:05:43 +01:00
|
|
|
Name: "payments",
|
|
|
|
PrimaryKey: []string{"id"},
|
|
|
|
Columns: []*dbschema.Column{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-06-24 18:05:43 +01:00
|
|
|
Name: "amount",
|
|
|
|
Type: "bigint",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-06-24 18:05:43 +01:00
|
|
|
Name: "created_at",
|
|
|
|
Type: "timestamp",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-06-24 18:05:43 +01:00
|
|
|
Name: "id",
|
|
|
|
Type: "bigserial",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-06-24 18:05:43 +01:00
|
|
|
Name: "notes",
|
2022-04-25 14:46:45 +01:00
|
|
|
Type: "TEXT",
|
2020-06-24 18:05:43 +01:00
|
|
|
IsNullable: true,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-06-24 18:05:43 +01:00
|
|
|
Name: "period",
|
2022-04-25 14:46:45 +01:00
|
|
|
Type: "TEXT",
|
2020-06-24 18:05:43 +01:00
|
|
|
IsNullable: true,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-06-24 18:05:43 +01:00
|
|
|
Name: "receipt",
|
2022-04-25 14:46:45 +01:00
|
|
|
Type: "TEXT",
|
2020-06-24 18:05:43 +01:00
|
|
|
IsNullable: true,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-06-24 18:05:43 +01:00
|
|
|
Name: "satellite_id",
|
|
|
|
Type: "bytea",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-03-12 14:42:01 +00:00
|
|
|
Name: "paystubs",
|
|
|
|
PrimaryKey: []string{"period", "satellite_id"},
|
|
|
|
Columns: []*dbschema.Column{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-03-12 14:42:01 +00:00
|
|
|
Name: "codes",
|
2022-04-25 14:46:45 +01:00
|
|
|
Type: "TEXT",
|
2020-03-12 14:42:01 +00:00
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-03-12 14:42:01 +00:00
|
|
|
Name: "comp_at_rest",
|
|
|
|
Type: "bigint",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-03-12 14:42:01 +00:00
|
|
|
Name: "comp_get",
|
|
|
|
Type: "bigint",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-03-12 14:42:01 +00:00
|
|
|
Name: "comp_get_audit",
|
|
|
|
Type: "bigint",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-03-12 14:42:01 +00:00
|
|
|
Name: "comp_get_repair",
|
|
|
|
Type: "bigint",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-03-12 14:42:01 +00:00
|
|
|
Name: "comp_put",
|
|
|
|
Type: "bigint",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-03-12 14:42:01 +00:00
|
|
|
Name: "comp_put_repair",
|
|
|
|
Type: "bigint",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-03-12 14:42:01 +00:00
|
|
|
Name: "created_at",
|
2020-03-15 13:06:01 +00:00
|
|
|
Type: "timestamp",
|
2020-03-12 14:42:01 +00:00
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-03-12 14:42:01 +00:00
|
|
|
Name: "disposed",
|
|
|
|
Type: "bigint",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2021-02-02 10:51:02 +00:00
|
|
|
Name: "distributed",
|
|
|
|
Type: "bigint",
|
2021-02-09 16:15:17 +00:00
|
|
|
IsNullable: false,
|
2021-02-02 10:51:02 +00:00
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-03-12 14:42:01 +00:00
|
|
|
Name: "held",
|
|
|
|
Type: "bigint",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-03-12 14:42:01 +00:00
|
|
|
Name: "owed",
|
|
|
|
Type: "bigint",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-03-12 14:42:01 +00:00
|
|
|
Name: "paid",
|
|
|
|
Type: "bigint",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-03-12 14:42:01 +00:00
|
|
|
Name: "period",
|
2022-04-25 14:46:45 +01:00
|
|
|
Type: "TEXT",
|
2020-03-12 14:42:01 +00:00
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-03-12 14:42:01 +00:00
|
|
|
Name: "satellite_id",
|
|
|
|
Type: "bytea",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-03-12 14:42:01 +00:00
|
|
|
Name: "surge_percent",
|
|
|
|
Type: "bigint",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-03-12 14:42:01 +00:00
|
|
|
Name: "usage_at_rest",
|
|
|
|
Type: "double precision",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-03-12 14:42:01 +00:00
|
|
|
Name: "usage_get",
|
|
|
|
Type: "bigint",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-03-12 14:42:01 +00:00
|
|
|
Name: "usage_get_audit",
|
|
|
|
Type: "bigint",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-03-12 14:42:01 +00:00
|
|
|
Name: "usage_get_repair",
|
|
|
|
Type: "bigint",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-03-12 14:42:01 +00:00
|
|
|
Name: "usage_put",
|
|
|
|
Type: "bigint",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-03-12 14:42:01 +00:00
|
|
|
Name: "usage_put_repair",
|
|
|
|
Type: "bigint",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
"info": {},
|
|
|
|
"notifications": {
|
2020-01-09 20:23:47 +00:00
|
|
|
Tables: []*dbschema.Table{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "notifications",
|
|
|
|
PrimaryKey: []string{"id"},
|
|
|
|
Columns: []*dbschema.Column{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "created_at",
|
|
|
|
Type: "TIMESTAMP",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "id",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "message",
|
|
|
|
Type: "TEXT",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "read_at",
|
|
|
|
Type: "TIMESTAMP",
|
|
|
|
IsNullable: true,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "sender_id",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "title",
|
|
|
|
Type: "TEXT",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "type",
|
|
|
|
Type: "INTEGER",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
"orders": {
|
2020-01-09 20:23:47 +00:00
|
|
|
Tables: []*dbschema.Table{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "order_archive_",
|
|
|
|
Columns: []*dbschema.Column{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "archived_at",
|
|
|
|
Type: "TIMESTAMP",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "order_limit_serialized",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "order_serialized",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "satellite_id",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "serial_number",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "status",
|
|
|
|
Type: "INTEGER",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "uplink_cert_id",
|
|
|
|
Type: "INTEGER",
|
|
|
|
IsNullable: false,
|
|
|
|
Reference: &dbschema.Reference{Table: "certificate", Column: "cert_id", OnDelete: "", OnUpdate: ""},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "unsent_order",
|
|
|
|
Columns: []*dbschema.Column{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "order_limit_expiration",
|
|
|
|
Type: "TIMESTAMP",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "order_limit_serialized",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "order_serialized",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "satellite_id",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "serial_number",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "uplink_cert_id",
|
|
|
|
Type: "INTEGER",
|
|
|
|
IsNullable: false,
|
|
|
|
Reference: &dbschema.Reference{Table: "certificate", Column: "cert_id", OnDelete: "", OnUpdate: ""},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Indexes: []*dbschema.Index{
|
2022-03-31 08:55:19 +01:00
|
|
|
{Name: "idx_order_archived_at", Table: "order_archive_", Columns: []string{"archived_at"}, Unique: false, Partial: ""},
|
|
|
|
{Name: "idx_orders", Table: "unsent_order", Columns: []string{"satellite_id", "serial_number"}, Unique: true, Partial: ""},
|
2020-01-09 20:23:47 +00:00
|
|
|
},
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
"piece_expiration": {
|
2020-01-09 20:23:47 +00:00
|
|
|
Tables: []*dbschema.Table{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "piece_expirations",
|
|
|
|
PrimaryKey: []string{"piece_id", "satellite_id"},
|
|
|
|
Columns: []*dbschema.Column{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "deletion_failed_at",
|
|
|
|
Type: "TIMESTAMP",
|
|
|
|
IsNullable: true,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "piece_expiration",
|
|
|
|
Type: "TIMESTAMP",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "piece_id",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "satellite_id",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "trash",
|
|
|
|
Type: "INTEGER",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Indexes: []*dbschema.Index{
|
2022-03-31 08:55:19 +01:00
|
|
|
{Name: "idx_piece_expirations_deletion_failed_at", Table: "piece_expirations", Columns: []string{"deletion_failed_at"}, Unique: false, Partial: ""},
|
|
|
|
{Name: "idx_piece_expirations_piece_expiration", Table: "piece_expirations", Columns: []string{"piece_expiration"}, Unique: false, Partial: ""},
|
|
|
|
{Name: "idx_piece_expirations_trashed", Table: "piece_expirations", Columns: []string{"satellite_id", "trash"}, Unique: false, Partial: "trash = 1"},
|
2020-01-09 20:23:47 +00:00
|
|
|
},
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
"piece_spaced_used": {
|
2020-01-09 20:23:47 +00:00
|
|
|
Tables: []*dbschema.Table{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "piece_space_used",
|
|
|
|
Columns: []*dbschema.Column{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-07 23:34:51 +00:00
|
|
|
Name: "content_size",
|
|
|
|
Type: "INTEGER",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "satellite_id",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: true,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "total",
|
|
|
|
Type: "INTEGER",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Indexes: []*dbschema.Index{
|
2022-03-31 08:55:19 +01:00
|
|
|
{Name: "idx_piece_space_used_satellite_id", Table: "piece_space_used", Columns: []string{"satellite_id"}, Unique: true, Partial: ""},
|
2020-01-09 20:23:47 +00:00
|
|
|
},
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
"pieceinfo": {
|
2020-01-09 20:23:47 +00:00
|
|
|
Tables: []*dbschema.Table{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "pieceinfo_",
|
|
|
|
Columns: []*dbschema.Column{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "deletion_failed_at",
|
|
|
|
Type: "TIMESTAMP",
|
|
|
|
IsNullable: true,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "order_limit",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "piece_creation",
|
|
|
|
Type: "TIMESTAMP",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "piece_expiration",
|
|
|
|
Type: "TIMESTAMP",
|
|
|
|
IsNullable: true,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "piece_id",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "piece_size",
|
|
|
|
Type: "BIGINT",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "satellite_id",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "uplink_cert_id",
|
|
|
|
Type: "INTEGER",
|
|
|
|
IsNullable: false,
|
|
|
|
Reference: &dbschema.Reference{Table: "certificate", Column: "cert_id", OnDelete: "", OnUpdate: ""},
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "uplink_piece_hash",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Indexes: []*dbschema.Index{
|
2022-03-31 08:55:19 +01:00
|
|
|
{Name: "idx_pieceinfo__expiration", Table: "pieceinfo_", Columns: []string{"piece_expiration"}, Unique: false, Partial: "piece_expiration IS NOT NULL"},
|
|
|
|
{Name: "pk_pieceinfo_", Table: "pieceinfo_", Columns: []string{"satellite_id", "piece_id"}, Unique: true, Partial: ""},
|
2020-01-09 20:23:47 +00:00
|
|
|
},
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
"pricing": {
|
2020-04-10 15:03:14 +01:00
|
|
|
Tables: []*dbschema.Table{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-04-10 15:03:14 +01:00
|
|
|
Name: "pricing",
|
|
|
|
PrimaryKey: []string{"satellite_id"},
|
|
|
|
Columns: []*dbschema.Column{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-04-10 15:03:14 +01:00
|
|
|
Name: "audit_bandwidth_price",
|
|
|
|
Type: "bigint",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-04-10 15:03:14 +01:00
|
|
|
Name: "disk_space_price",
|
|
|
|
Type: "bigint",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-04-10 15:03:14 +01:00
|
|
|
Name: "egress_bandwidth_price",
|
|
|
|
Type: "bigint",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-04-10 15:03:14 +01:00
|
|
|
Name: "repair_bandwidth_price",
|
|
|
|
Type: "bigint",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-04-10 15:03:14 +01:00
|
|
|
Name: "satellite_id",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
"reputation": {
|
2020-01-09 20:23:47 +00:00
|
|
|
Tables: []*dbschema.Table{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "reputation",
|
|
|
|
PrimaryKey: []string{"satellite_id"},
|
|
|
|
Columns: []*dbschema.Column{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-12-30 19:47:14 +00:00
|
|
|
Name: "audit_history",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: true,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "audit_reputation_alpha",
|
|
|
|
Type: "REAL",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "audit_reputation_beta",
|
|
|
|
Type: "REAL",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "audit_reputation_score",
|
|
|
|
Type: "REAL",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "audit_success_count",
|
|
|
|
Type: "INTEGER",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "audit_total_count",
|
|
|
|
Type: "INTEGER",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-05-03 17:30:54 +01:00
|
|
|
Name: "audit_unknown_reputation_alpha",
|
|
|
|
Type: "REAL",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-05-03 17:30:54 +01:00
|
|
|
Name: "audit_unknown_reputation_beta",
|
|
|
|
Type: "REAL",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-05-18 11:01:34 +01:00
|
|
|
Name: "audit_unknown_reputation_score",
|
|
|
|
Type: "REAL",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-09-01 12:20:12 +01:00
|
|
|
Name: "disqualified_at",
|
2020-01-09 20:23:47 +00:00
|
|
|
Type: "TIMESTAMP",
|
|
|
|
IsNullable: true,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-04-16 16:40:28 +01:00
|
|
|
Name: "joined_at",
|
|
|
|
Type: "TIMESTAMP",
|
2020-04-30 21:36:04 +01:00
|
|
|
IsNullable: false,
|
2020-04-16 16:40:28 +01:00
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-09-01 12:20:12 +01:00
|
|
|
Name: "offline_suspended_at",
|
|
|
|
Type: "TIMESTAMP",
|
|
|
|
IsNullable: true,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-09-02 16:37:54 +01:00
|
|
|
Name: "offline_under_review_at",
|
|
|
|
Type: "TIMESTAMP",
|
|
|
|
IsNullable: true,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-09-01 12:20:12 +01:00
|
|
|
Name: "online_score",
|
|
|
|
Type: "REAL",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "satellite_id",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-09-01 12:20:12 +01:00
|
|
|
Name: "suspended_at",
|
2020-03-27 18:50:57 +00:00
|
|
|
Type: "TIMESTAMP",
|
|
|
|
IsNullable: true,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "updated_at",
|
|
|
|
Type: "TIMESTAMP",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2021-07-02 14:13:13 +01:00
|
|
|
Name: "vetted_at",
|
|
|
|
Type: "TIMESTAMP",
|
|
|
|
IsNullable: true,
|
|
|
|
},
|
2020-01-09 20:23:47 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
"satellites": {
|
2020-01-09 20:23:47 +00:00
|
|
|
Tables: []*dbschema.Table{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-05-20 13:01:19 +01:00
|
|
|
Name: "satellite_exit_progress",
|
2020-01-09 20:23:47 +00:00
|
|
|
Columns: []*dbschema.Column{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "bytes_deleted",
|
|
|
|
Type: "INTEGER",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "completion_receipt",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: true,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "finished_at",
|
|
|
|
Type: "TIMESTAMP",
|
|
|
|
IsNullable: true,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "initiated_at",
|
|
|
|
Type: "TIMESTAMP",
|
|
|
|
IsNullable: true,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "satellite_id",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: false,
|
2020-05-20 13:01:19 +01:00
|
|
|
Reference: &dbschema.Reference{Table: "satellites", Column: "node_id", OnDelete: "", OnUpdate: ""},
|
2020-01-09 20:23:47 +00:00
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "starting_disk_usage",
|
|
|
|
Type: "INTEGER",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "satellites",
|
|
|
|
PrimaryKey: []string{"node_id"},
|
|
|
|
Columns: []*dbschema.Column{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "added_at",
|
|
|
|
Type: "TIMESTAMP",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2021-07-08 10:14:15 +01:00
|
|
|
Name: "address",
|
|
|
|
Type: "TEXT",
|
|
|
|
IsNullable: true,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "node_id",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "status",
|
|
|
|
Type: "INTEGER",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
"secret": {
|
2020-09-21 12:06:43 +01:00
|
|
|
Tables: []*dbschema.Table{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-09-21 12:06:43 +01:00
|
|
|
Name: "secret",
|
|
|
|
PrimaryKey: []string{"token"},
|
|
|
|
Columns: []*dbschema.Column{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-09-21 12:06:43 +01:00
|
|
|
Name: "created_at",
|
|
|
|
Type: "timestamp with time zone",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-09-21 12:06:43 +01:00
|
|
|
Name: "token",
|
|
|
|
Type: "bytea",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
"storage_usage": {
|
2020-01-09 20:23:47 +00:00
|
|
|
Tables: []*dbschema.Table{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "storage_usage",
|
2022-07-21 12:15:03 +01:00
|
|
|
PrimaryKey: []string{"satellite_id", "timestamp"},
|
2020-01-09 20:23:47 +00:00
|
|
|
Columns: []*dbschema.Column{
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "at_rest_total",
|
|
|
|
Type: "REAL",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2022-07-21 12:15:03 +01:00
|
|
|
Name: "interval_end_time",
|
2020-01-09 20:23:47 +00:00
|
|
|
Type: "TIMESTAMP",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
{
|
2020-01-09 20:23:47 +00:00
|
|
|
Name: "satellite_id",
|
|
|
|
Type: "BLOB",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2022-07-21 12:15:03 +01:00
|
|
|
{
|
|
|
|
Name: "timestamp",
|
|
|
|
Type: "TIMESTAMP",
|
|
|
|
IsNullable: false,
|
|
|
|
},
|
2020-01-09 20:23:47 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2022-03-31 08:55:19 +01:00
|
|
|
"used_serial": {},
|
2020-01-09 20:23:47 +00:00
|
|
|
}
|
|
|
|
}
|