mirror of
https://github.com/nestriness/nestri.git
synced 2026-09-19 09:15:19 +03:00
style: apply the formatter across the tree
The formatter had never been run over these files, so `oxfmt` on a couple of touched files rewrote two dozen others and buried the real change. Running it everywhere once makes the next diff mean something. No behaviour changes: import ordering, line joining, and reindented JSON in the generated migration snapshots. Both test suites and both typechecks give the same answers as before, including the two type errors this does not fix.
This commit is contained in:
@@ -281,4 +281,3 @@ Route handler
|
||||
│
|
||||
└─ returns normally ─────► c.json({ data: … })
|
||||
```
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ import { Actor } from '@nestri/core/actor';
|
||||
import { Env } from '@nestri/core/env';
|
||||
import { ErrorCodes, VisibleError } from '@nestri/core/error';
|
||||
import { Examples } from '@nestri/core/examples';
|
||||
import { User } from '@nestri/core/user/index';
|
||||
import { Fingerprint } from '@nestri/core/user/fingerprint';
|
||||
import { User } from '@nestri/core/user/index';
|
||||
import { VERIFICATION_TTL_MINUTES, Verification } from '@nestri/core/user/verification';
|
||||
import { Hono } from 'hono';
|
||||
import { describeRoute } from 'hono-openapi';
|
||||
@@ -159,9 +159,7 @@ export namespace UserApi {
|
||||
200: {
|
||||
content: {
|
||||
'application/json': {
|
||||
schema: Result(
|
||||
z.object({ verified: z.boolean() })
|
||||
)
|
||||
schema: Result(z.object({ verified: z.boolean() }))
|
||||
}
|
||||
},
|
||||
description: 'Email verified'
|
||||
|
||||
@@ -6,7 +6,7 @@ serialization lives here. The API and auth workers are thin pass-through transla
|
||||
## What it contains
|
||||
|
||||
| Area | Files | Purpose |
|
||||
| ---- | ----- | ------- |
|
||||
| -------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
||||
| **db** | `db/index.ts`, `db/types.ts`, `db/test.ts` | Drizzle + Postgres (`Database.use/transaction`), ULID column helpers |
|
||||
| **users** | `user/*` | Users, linked accounts, fingerprints, library |
|
||||
| **teams** | `team/*` | Teams + membership with roles (`team_member`) |
|
||||
|
||||
@@ -123,12 +123,8 @@
|
||||
"name": "access_token_owner_user_id_user_id_fk",
|
||||
"tableFrom": "access_token",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -136,12 +132,8 @@
|
||||
"name": "access_token_team_id_team_id_fk",
|
||||
"tableFrom": "access_token",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -323,12 +315,8 @@
|
||||
"name": "game_depot_game_id_game_id_fk",
|
||||
"tableFrom": "game_depot",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -485,12 +473,8 @@
|
||||
"name": "game_download_game_id_game_id_fk",
|
||||
"tableFrom": "game_download",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -720,9 +704,7 @@
|
||||
"game_steam_app_id_unique": {
|
||||
"name": "game_steam_app_id_unique",
|
||||
"nullsNotDistinct": false,
|
||||
"columns": [
|
||||
"steam_app_id"
|
||||
]
|
||||
"columns": ["steam_app_id"]
|
||||
}
|
||||
},
|
||||
"policies": {},
|
||||
@@ -842,12 +824,8 @@
|
||||
"name": "machine_owner_user_id_user_id_fk",
|
||||
"tableFrom": "machine",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1074,12 +1052,8 @@
|
||||
"name": "team_member_team_id_team_id_fk",
|
||||
"tableFrom": "team_member",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1087,12 +1061,8 @@
|
||||
"name": "team_member_user_id_user_id_fk",
|
||||
"tableFrom": "team_member",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1184,12 +1154,8 @@
|
||||
"name": "team_owner_id_user_id_fk",
|
||||
"tableFrom": "team",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1199,9 +1165,7 @@
|
||||
"team_slug_unique": {
|
||||
"name": "team_slug_unique",
|
||||
"nullsNotDistinct": false,
|
||||
"columns": [
|
||||
"slug"
|
||||
]
|
||||
"columns": ["slug"]
|
||||
}
|
||||
},
|
||||
"policies": {},
|
||||
@@ -1300,12 +1264,8 @@
|
||||
"name": "user_fingerprint_user_id_user_id_fk",
|
||||
"tableFrom": "user_fingerprint",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1435,12 +1395,8 @@
|
||||
"name": "user_library_user_id_user_id_fk",
|
||||
"tableFrom": "user_library",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1448,12 +1404,8 @@
|
||||
"name": "user_library_game_id_game_id_fk",
|
||||
"tableFrom": "user_library",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1563,12 +1515,8 @@
|
||||
"name": "linked_account_user_id_user_id_fk",
|
||||
"tableFrom": "linked_account",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1648,42 +1596,22 @@
|
||||
"public.depot_status": {
|
||||
"name": "depot_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"downloading",
|
||||
"complete",
|
||||
"error",
|
||||
"deleted"
|
||||
]
|
||||
"values": ["pending", "downloading", "complete", "error", "deleted"]
|
||||
},
|
||||
"public.game_download_status": {
|
||||
"name": "game_download_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"verifying",
|
||||
"downloading",
|
||||
"ready",
|
||||
"failed"
|
||||
]
|
||||
"values": ["pending", "verifying", "downloading", "ready", "failed"]
|
||||
},
|
||||
"public.team_member_role": {
|
||||
"name": "team_member_role",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"owner",
|
||||
"admin",
|
||||
"member"
|
||||
]
|
||||
"values": ["owner", "admin", "member"]
|
||||
},
|
||||
"public.linked_account_provider": {
|
||||
"name": "linked_account_provider",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"steam",
|
||||
"ssh",
|
||||
"discord"
|
||||
]
|
||||
"values": ["steam", "ssh", "discord"]
|
||||
}
|
||||
},
|
||||
"schemas": {},
|
||||
|
||||
@@ -123,12 +123,8 @@
|
||||
"name": "access_token_owner_user_id_user_id_fk",
|
||||
"tableFrom": "access_token",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -136,12 +132,8 @@
|
||||
"name": "access_token_team_id_team_id_fk",
|
||||
"tableFrom": "access_token",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -323,12 +315,8 @@
|
||||
"name": "game_depot_game_id_game_id_fk",
|
||||
"tableFrom": "game_depot",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -485,12 +473,8 @@
|
||||
"name": "game_download_game_id_game_id_fk",
|
||||
"tableFrom": "game_download",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -726,9 +710,7 @@
|
||||
"game_steam_app_id_unique": {
|
||||
"name": "game_steam_app_id_unique",
|
||||
"nullsNotDistinct": false,
|
||||
"columns": [
|
||||
"steam_app_id"
|
||||
]
|
||||
"columns": ["steam_app_id"]
|
||||
}
|
||||
},
|
||||
"policies": {},
|
||||
@@ -848,12 +830,8 @@
|
||||
"name": "machine_owner_user_id_user_id_fk",
|
||||
"tableFrom": "machine",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1080,12 +1058,8 @@
|
||||
"name": "team_member_team_id_team_id_fk",
|
||||
"tableFrom": "team_member",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1093,12 +1067,8 @@
|
||||
"name": "team_member_user_id_user_id_fk",
|
||||
"tableFrom": "team_member",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1190,12 +1160,8 @@
|
||||
"name": "team_owner_id_user_id_fk",
|
||||
"tableFrom": "team",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1205,9 +1171,7 @@
|
||||
"team_slug_unique": {
|
||||
"name": "team_slug_unique",
|
||||
"nullsNotDistinct": false,
|
||||
"columns": [
|
||||
"slug"
|
||||
]
|
||||
"columns": ["slug"]
|
||||
}
|
||||
},
|
||||
"policies": {},
|
||||
@@ -1306,12 +1270,8 @@
|
||||
"name": "user_fingerprint_user_id_user_id_fk",
|
||||
"tableFrom": "user_fingerprint",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1441,12 +1401,8 @@
|
||||
"name": "user_library_user_id_user_id_fk",
|
||||
"tableFrom": "user_library",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1454,12 +1410,8 @@
|
||||
"name": "user_library_game_id_game_id_fk",
|
||||
"tableFrom": "user_library",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1569,12 +1521,8 @@
|
||||
"name": "linked_account_user_id_user_id_fk",
|
||||
"tableFrom": "linked_account",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1746,12 +1694,8 @@
|
||||
"name": "verification_user_id_user_id_fk",
|
||||
"tableFrom": "verification",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1850,49 +1794,27 @@
|
||||
"public.depot_status": {
|
||||
"name": "depot_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"downloading",
|
||||
"complete",
|
||||
"error",
|
||||
"deleted"
|
||||
]
|
||||
"values": ["pending", "downloading", "complete", "error", "deleted"]
|
||||
},
|
||||
"public.game_download_status": {
|
||||
"name": "game_download_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"verifying",
|
||||
"downloading",
|
||||
"ready",
|
||||
"failed"
|
||||
]
|
||||
"values": ["pending", "verifying", "downloading", "ready", "failed"]
|
||||
},
|
||||
"public.team_member_role": {
|
||||
"name": "team_member_role",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"owner",
|
||||
"admin",
|
||||
"member"
|
||||
]
|
||||
"values": ["owner", "admin", "member"]
|
||||
},
|
||||
"public.linked_account_provider": {
|
||||
"name": "linked_account_provider",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"steam",
|
||||
"ssh",
|
||||
"discord"
|
||||
]
|
||||
"values": ["steam", "ssh", "discord"]
|
||||
},
|
||||
"public.verification_kind": {
|
||||
"name": "verification_kind",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"email"
|
||||
]
|
||||
"values": ["email"]
|
||||
}
|
||||
},
|
||||
"schemas": {},
|
||||
|
||||
@@ -123,12 +123,8 @@
|
||||
"name": "access_token_owner_user_id_user_id_fk",
|
||||
"tableFrom": "access_token",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -136,12 +132,8 @@
|
||||
"name": "access_token_team_id_team_id_fk",
|
||||
"tableFrom": "access_token",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -266,12 +258,8 @@
|
||||
"name": "box_user_id_user_id_fk",
|
||||
"tableFrom": "box",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -279,12 +267,8 @@
|
||||
"name": "box_machine_id_machine_id_fk",
|
||||
"tableFrom": "box",
|
||||
"tableTo": "machine",
|
||||
"columnsFrom": [
|
||||
"machine_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["machine_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -466,12 +450,8 @@
|
||||
"name": "game_depot_game_id_game_id_fk",
|
||||
"tableFrom": "game_depot",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -628,12 +608,8 @@
|
||||
"name": "game_download_host_id_machine_id_fk",
|
||||
"tableFrom": "game_download",
|
||||
"tableTo": "machine",
|
||||
"columnsFrom": [
|
||||
"host_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["host_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -641,12 +617,8 @@
|
||||
"name": "game_download_game_id_game_id_fk",
|
||||
"tableFrom": "game_download",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -882,9 +854,7 @@
|
||||
"game_steam_app_id_unique": {
|
||||
"name": "game_steam_app_id_unique",
|
||||
"nullsNotDistinct": false,
|
||||
"columns": [
|
||||
"steam_app_id"
|
||||
]
|
||||
"columns": ["steam_app_id"]
|
||||
}
|
||||
},
|
||||
"policies": {},
|
||||
@@ -1004,12 +974,8 @@
|
||||
"name": "machine_owner_user_id_user_id_fk",
|
||||
"tableFrom": "machine",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1017,12 +983,8 @@
|
||||
"name": "machine_team_id_team_id_fk",
|
||||
"tableFrom": "machine",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1273,12 +1235,8 @@
|
||||
"name": "session_box_id_box_id_fk",
|
||||
"tableFrom": "session",
|
||||
"tableTo": "box",
|
||||
"columnsFrom": [
|
||||
"box_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["box_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1286,12 +1244,8 @@
|
||||
"name": "session_game_id_game_id_fk",
|
||||
"tableFrom": "session",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1299,12 +1253,8 @@
|
||||
"name": "session_linked_account_id_linked_account_id_fk",
|
||||
"tableFrom": "session",
|
||||
"tableTo": "linked_account",
|
||||
"columnsFrom": [
|
||||
"linked_account_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["linked_account_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1424,12 +1374,8 @@
|
||||
"name": "team_member_team_id_team_id_fk",
|
||||
"tableFrom": "team_member",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1437,12 +1383,8 @@
|
||||
"name": "team_member_user_id_user_id_fk",
|
||||
"tableFrom": "team_member",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1534,12 +1476,8 @@
|
||||
"name": "team_owner_id_user_id_fk",
|
||||
"tableFrom": "team",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1549,9 +1487,7 @@
|
||||
"team_slug_unique": {
|
||||
"name": "team_slug_unique",
|
||||
"nullsNotDistinct": false,
|
||||
"columns": [
|
||||
"slug"
|
||||
]
|
||||
"columns": ["slug"]
|
||||
}
|
||||
},
|
||||
"policies": {},
|
||||
@@ -1650,12 +1586,8 @@
|
||||
"name": "user_fingerprint_user_id_user_id_fk",
|
||||
"tableFrom": "user_fingerprint",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1785,12 +1717,8 @@
|
||||
"name": "user_library_user_id_user_id_fk",
|
||||
"tableFrom": "user_library",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1798,12 +1726,8 @@
|
||||
"name": "user_library_game_id_game_id_fk",
|
||||
"tableFrom": "user_library",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1913,12 +1837,8 @@
|
||||
"name": "linked_account_user_id_user_id_fk",
|
||||
"tableFrom": "linked_account",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2090,12 +2010,8 @@
|
||||
"name": "verification_user_id_user_id_fk",
|
||||
"tableFrom": "verification",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2194,80 +2110,42 @@
|
||||
"public.box_state": {
|
||||
"name": "box_state",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"created",
|
||||
"running",
|
||||
"stopped"
|
||||
]
|
||||
"values": ["created", "running", "stopped"]
|
||||
},
|
||||
"public.box_tier": {
|
||||
"name": "box_tier",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"xs",
|
||||
"sm",
|
||||
"md",
|
||||
"lg",
|
||||
"xl"
|
||||
]
|
||||
"values": ["xs", "sm", "md", "lg", "xl"]
|
||||
},
|
||||
"public.depot_status": {
|
||||
"name": "depot_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"downloading",
|
||||
"complete",
|
||||
"error",
|
||||
"deleted"
|
||||
]
|
||||
"values": ["pending", "downloading", "complete", "error", "deleted"]
|
||||
},
|
||||
"public.game_download_status": {
|
||||
"name": "game_download_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"verifying",
|
||||
"downloading",
|
||||
"ready",
|
||||
"failed"
|
||||
]
|
||||
"values": ["pending", "verifying", "downloading", "ready", "failed"]
|
||||
},
|
||||
"public.session_state": {
|
||||
"name": "session_state",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"requested",
|
||||
"starting",
|
||||
"live",
|
||||
"ended",
|
||||
"failed"
|
||||
]
|
||||
"values": ["requested", "starting", "live", "ended", "failed"]
|
||||
},
|
||||
"public.team_member_role": {
|
||||
"name": "team_member_role",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"owner",
|
||||
"admin",
|
||||
"member"
|
||||
]
|
||||
"values": ["owner", "admin", "member"]
|
||||
},
|
||||
"public.linked_account_provider": {
|
||||
"name": "linked_account_provider",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"steam",
|
||||
"ssh",
|
||||
"discord"
|
||||
]
|
||||
"values": ["steam", "ssh", "discord"]
|
||||
},
|
||||
"public.verification_kind": {
|
||||
"name": "verification_kind",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"email"
|
||||
]
|
||||
"values": ["email"]
|
||||
}
|
||||
},
|
||||
"schemas": {},
|
||||
|
||||
@@ -123,12 +123,8 @@
|
||||
"name": "access_token_owner_user_id_user_id_fk",
|
||||
"tableFrom": "access_token",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -136,12 +132,8 @@
|
||||
"name": "access_token_team_id_team_id_fk",
|
||||
"tableFrom": "access_token",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -266,12 +258,8 @@
|
||||
"name": "box_user_id_user_id_fk",
|
||||
"tableFrom": "box",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -279,12 +267,8 @@
|
||||
"name": "box_machine_id_machine_id_fk",
|
||||
"tableFrom": "box",
|
||||
"tableTo": "machine",
|
||||
"columnsFrom": [
|
||||
"machine_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["machine_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -466,12 +450,8 @@
|
||||
"name": "game_depot_game_id_game_id_fk",
|
||||
"tableFrom": "game_depot",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -628,12 +608,8 @@
|
||||
"name": "game_download_host_id_machine_id_fk",
|
||||
"tableFrom": "game_download",
|
||||
"tableTo": "machine",
|
||||
"columnsFrom": [
|
||||
"host_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["host_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -641,12 +617,8 @@
|
||||
"name": "game_download_game_id_game_id_fk",
|
||||
"tableFrom": "game_download",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -882,9 +854,7 @@
|
||||
"game_steam_app_id_unique": {
|
||||
"name": "game_steam_app_id_unique",
|
||||
"nullsNotDistinct": false,
|
||||
"columns": [
|
||||
"steam_app_id"
|
||||
]
|
||||
"columns": ["steam_app_id"]
|
||||
}
|
||||
},
|
||||
"policies": {},
|
||||
@@ -1004,12 +974,8 @@
|
||||
"name": "machine_owner_user_id_user_id_fk",
|
||||
"tableFrom": "machine",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1017,12 +983,8 @@
|
||||
"name": "machine_team_id_team_id_fk",
|
||||
"tableFrom": "machine",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1289,12 +1251,8 @@
|
||||
"name": "session_box_id_box_id_fk",
|
||||
"tableFrom": "session",
|
||||
"tableTo": "box",
|
||||
"columnsFrom": [
|
||||
"box_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["box_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1302,12 +1260,8 @@
|
||||
"name": "session_game_id_game_id_fk",
|
||||
"tableFrom": "session",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1315,12 +1269,8 @@
|
||||
"name": "session_linked_account_id_linked_account_id_fk",
|
||||
"tableFrom": "session",
|
||||
"tableTo": "linked_account",
|
||||
"columnsFrom": [
|
||||
"linked_account_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["linked_account_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1440,12 +1390,8 @@
|
||||
"name": "team_member_team_id_team_id_fk",
|
||||
"tableFrom": "team_member",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1453,12 +1399,8 @@
|
||||
"name": "team_member_user_id_user_id_fk",
|
||||
"tableFrom": "team_member",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1550,12 +1492,8 @@
|
||||
"name": "team_owner_id_user_id_fk",
|
||||
"tableFrom": "team",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1565,9 +1503,7 @@
|
||||
"team_slug_unique": {
|
||||
"name": "team_slug_unique",
|
||||
"nullsNotDistinct": false,
|
||||
"columns": [
|
||||
"slug"
|
||||
]
|
||||
"columns": ["slug"]
|
||||
}
|
||||
},
|
||||
"policies": {},
|
||||
@@ -1666,12 +1602,8 @@
|
||||
"name": "user_fingerprint_user_id_user_id_fk",
|
||||
"tableFrom": "user_fingerprint",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1801,12 +1733,8 @@
|
||||
"name": "user_library_user_id_user_id_fk",
|
||||
"tableFrom": "user_library",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1814,12 +1742,8 @@
|
||||
"name": "user_library_game_id_game_id_fk",
|
||||
"tableFrom": "user_library",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1929,12 +1853,8 @@
|
||||
"name": "linked_account_user_id_user_id_fk",
|
||||
"tableFrom": "linked_account",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2106,12 +2026,8 @@
|
||||
"name": "verification_user_id_user_id_fk",
|
||||
"tableFrom": "verification",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2210,80 +2126,42 @@
|
||||
"public.box_state": {
|
||||
"name": "box_state",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"created",
|
||||
"running",
|
||||
"stopped"
|
||||
]
|
||||
"values": ["created", "running", "stopped"]
|
||||
},
|
||||
"public.box_tier": {
|
||||
"name": "box_tier",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"xs",
|
||||
"sm",
|
||||
"md",
|
||||
"lg",
|
||||
"xl"
|
||||
]
|
||||
"values": ["xs", "sm", "md", "lg", "xl"]
|
||||
},
|
||||
"public.depot_status": {
|
||||
"name": "depot_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"downloading",
|
||||
"complete",
|
||||
"error",
|
||||
"deleted"
|
||||
]
|
||||
"values": ["pending", "downloading", "complete", "error", "deleted"]
|
||||
},
|
||||
"public.game_download_status": {
|
||||
"name": "game_download_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"verifying",
|
||||
"downloading",
|
||||
"ready",
|
||||
"failed"
|
||||
]
|
||||
"values": ["pending", "verifying", "downloading", "ready", "failed"]
|
||||
},
|
||||
"public.session_state": {
|
||||
"name": "session_state",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"requested",
|
||||
"starting",
|
||||
"live",
|
||||
"ended",
|
||||
"failed"
|
||||
]
|
||||
"values": ["requested", "starting", "live", "ended", "failed"]
|
||||
},
|
||||
"public.team_member_role": {
|
||||
"name": "team_member_role",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"owner",
|
||||
"admin",
|
||||
"member"
|
||||
]
|
||||
"values": ["owner", "admin", "member"]
|
||||
},
|
||||
"public.linked_account_provider": {
|
||||
"name": "linked_account_provider",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"steam",
|
||||
"ssh",
|
||||
"discord"
|
||||
]
|
||||
"values": ["steam", "ssh", "discord"]
|
||||
},
|
||||
"public.verification_kind": {
|
||||
"name": "verification_kind",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"email"
|
||||
]
|
||||
"values": ["email"]
|
||||
}
|
||||
},
|
||||
"schemas": {},
|
||||
|
||||
@@ -123,12 +123,8 @@
|
||||
"name": "access_token_owner_user_id_user_id_fk",
|
||||
"tableFrom": "access_token",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -136,12 +132,8 @@
|
||||
"name": "access_token_team_id_team_id_fk",
|
||||
"tableFrom": "access_token",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -266,12 +258,8 @@
|
||||
"name": "box_user_id_user_id_fk",
|
||||
"tableFrom": "box",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -279,12 +267,8 @@
|
||||
"name": "box_machine_id_machine_id_fk",
|
||||
"tableFrom": "box",
|
||||
"tableTo": "machine",
|
||||
"columnsFrom": [
|
||||
"machine_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["machine_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -466,12 +450,8 @@
|
||||
"name": "game_depot_game_id_game_id_fk",
|
||||
"tableFrom": "game_depot",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -628,12 +608,8 @@
|
||||
"name": "game_download_host_id_machine_id_fk",
|
||||
"tableFrom": "game_download",
|
||||
"tableTo": "machine",
|
||||
"columnsFrom": [
|
||||
"host_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["host_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -641,12 +617,8 @@
|
||||
"name": "game_download_game_id_game_id_fk",
|
||||
"tableFrom": "game_download",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -882,9 +854,7 @@
|
||||
"game_steam_app_id_unique": {
|
||||
"name": "game_steam_app_id_unique",
|
||||
"nullsNotDistinct": false,
|
||||
"columns": [
|
||||
"steam_app_id"
|
||||
]
|
||||
"columns": ["steam_app_id"]
|
||||
}
|
||||
},
|
||||
"policies": {},
|
||||
@@ -1004,12 +974,8 @@
|
||||
"name": "machine_owner_user_id_user_id_fk",
|
||||
"tableFrom": "machine",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1017,12 +983,8 @@
|
||||
"name": "machine_team_id_team_id_fk",
|
||||
"tableFrom": "machine",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1295,12 +1257,8 @@
|
||||
"name": "session_box_id_box_id_fk",
|
||||
"tableFrom": "session",
|
||||
"tableTo": "box",
|
||||
"columnsFrom": [
|
||||
"box_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["box_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1308,12 +1266,8 @@
|
||||
"name": "session_game_id_game_id_fk",
|
||||
"tableFrom": "session",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1321,12 +1275,8 @@
|
||||
"name": "session_linked_account_id_linked_account_id_fk",
|
||||
"tableFrom": "session",
|
||||
"tableTo": "linked_account",
|
||||
"columnsFrom": [
|
||||
"linked_account_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["linked_account_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1446,12 +1396,8 @@
|
||||
"name": "team_member_team_id_team_id_fk",
|
||||
"tableFrom": "team_member",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1459,12 +1405,8 @@
|
||||
"name": "team_member_user_id_user_id_fk",
|
||||
"tableFrom": "team_member",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1556,12 +1498,8 @@
|
||||
"name": "team_owner_id_user_id_fk",
|
||||
"tableFrom": "team",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1571,9 +1509,7 @@
|
||||
"team_slug_unique": {
|
||||
"name": "team_slug_unique",
|
||||
"nullsNotDistinct": false,
|
||||
"columns": [
|
||||
"slug"
|
||||
]
|
||||
"columns": ["slug"]
|
||||
}
|
||||
},
|
||||
"policies": {},
|
||||
@@ -1672,12 +1608,8 @@
|
||||
"name": "user_fingerprint_user_id_user_id_fk",
|
||||
"tableFrom": "user_fingerprint",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1807,12 +1739,8 @@
|
||||
"name": "user_library_user_id_user_id_fk",
|
||||
"tableFrom": "user_library",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1820,12 +1748,8 @@
|
||||
"name": "user_library_game_id_game_id_fk",
|
||||
"tableFrom": "user_library",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1935,12 +1859,8 @@
|
||||
"name": "linked_account_user_id_user_id_fk",
|
||||
"tableFrom": "linked_account",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2129,12 +2049,8 @@
|
||||
"name": "verification_user_id_user_id_fk",
|
||||
"tableFrom": "verification",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2233,80 +2149,42 @@
|
||||
"public.box_state": {
|
||||
"name": "box_state",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"created",
|
||||
"running",
|
||||
"stopped"
|
||||
]
|
||||
"values": ["created", "running", "stopped"]
|
||||
},
|
||||
"public.box_tier": {
|
||||
"name": "box_tier",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"xs",
|
||||
"sm",
|
||||
"md",
|
||||
"lg",
|
||||
"xl"
|
||||
]
|
||||
"values": ["xs", "sm", "md", "lg", "xl"]
|
||||
},
|
||||
"public.depot_status": {
|
||||
"name": "depot_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"downloading",
|
||||
"complete",
|
||||
"error",
|
||||
"deleted"
|
||||
]
|
||||
"values": ["pending", "downloading", "complete", "error", "deleted"]
|
||||
},
|
||||
"public.game_download_status": {
|
||||
"name": "game_download_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"verifying",
|
||||
"downloading",
|
||||
"ready",
|
||||
"failed"
|
||||
]
|
||||
"values": ["pending", "verifying", "downloading", "ready", "failed"]
|
||||
},
|
||||
"public.session_state": {
|
||||
"name": "session_state",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"requested",
|
||||
"starting",
|
||||
"live",
|
||||
"ended",
|
||||
"failed"
|
||||
]
|
||||
"values": ["requested", "starting", "live", "ended", "failed"]
|
||||
},
|
||||
"public.team_member_role": {
|
||||
"name": "team_member_role",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"owner",
|
||||
"admin",
|
||||
"member"
|
||||
]
|
||||
"values": ["owner", "admin", "member"]
|
||||
},
|
||||
"public.linked_account_provider": {
|
||||
"name": "linked_account_provider",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"steam",
|
||||
"ssh",
|
||||
"discord"
|
||||
]
|
||||
"values": ["steam", "ssh", "discord"]
|
||||
},
|
||||
"public.verification_kind": {
|
||||
"name": "verification_kind",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"email"
|
||||
]
|
||||
"values": ["email"]
|
||||
}
|
||||
},
|
||||
"schemas": {},
|
||||
|
||||
@@ -123,12 +123,8 @@
|
||||
"name": "access_token_owner_user_id_user_id_fk",
|
||||
"tableFrom": "access_token",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -136,12 +132,8 @@
|
||||
"name": "access_token_team_id_team_id_fk",
|
||||
"tableFrom": "access_token",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -386,12 +378,8 @@
|
||||
"name": "box_user_id_user_id_fk",
|
||||
"tableFrom": "box",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -399,12 +387,8 @@
|
||||
"name": "box_machine_id_machine_id_fk",
|
||||
"tableFrom": "box",
|
||||
"tableTo": "machine",
|
||||
"columnsFrom": [
|
||||
"machine_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["machine_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -586,12 +570,8 @@
|
||||
"name": "game_depot_game_id_game_id_fk",
|
||||
"tableFrom": "game_depot",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -748,12 +728,8 @@
|
||||
"name": "game_download_host_id_machine_id_fk",
|
||||
"tableFrom": "game_download",
|
||||
"tableTo": "machine",
|
||||
"columnsFrom": [
|
||||
"host_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["host_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -761,12 +737,8 @@
|
||||
"name": "game_download_game_id_game_id_fk",
|
||||
"tableFrom": "game_download",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1002,9 +974,7 @@
|
||||
"game_steam_app_id_unique": {
|
||||
"name": "game_steam_app_id_unique",
|
||||
"nullsNotDistinct": false,
|
||||
"columns": [
|
||||
"steam_app_id"
|
||||
]
|
||||
"columns": ["steam_app_id"]
|
||||
}
|
||||
},
|
||||
"policies": {},
|
||||
@@ -1124,12 +1094,8 @@
|
||||
"name": "machine_owner_user_id_user_id_fk",
|
||||
"tableFrom": "machine",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1137,12 +1103,8 @@
|
||||
"name": "machine_team_id_team_id_fk",
|
||||
"tableFrom": "machine",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1415,12 +1377,8 @@
|
||||
"name": "session_box_id_box_id_fk",
|
||||
"tableFrom": "session",
|
||||
"tableTo": "box",
|
||||
"columnsFrom": [
|
||||
"box_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["box_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1428,12 +1386,8 @@
|
||||
"name": "session_game_id_game_id_fk",
|
||||
"tableFrom": "session",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1441,12 +1395,8 @@
|
||||
"name": "session_linked_account_id_linked_account_id_fk",
|
||||
"tableFrom": "session",
|
||||
"tableTo": "linked_account",
|
||||
"columnsFrom": [
|
||||
"linked_account_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["linked_account_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1566,12 +1516,8 @@
|
||||
"name": "team_member_team_id_team_id_fk",
|
||||
"tableFrom": "team_member",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1579,12 +1525,8 @@
|
||||
"name": "team_member_user_id_user_id_fk",
|
||||
"tableFrom": "team_member",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1676,12 +1618,8 @@
|
||||
"name": "team_owner_id_user_id_fk",
|
||||
"tableFrom": "team",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1691,9 +1629,7 @@
|
||||
"team_slug_unique": {
|
||||
"name": "team_slug_unique",
|
||||
"nullsNotDistinct": false,
|
||||
"columns": [
|
||||
"slug"
|
||||
]
|
||||
"columns": ["slug"]
|
||||
}
|
||||
},
|
||||
"policies": {},
|
||||
@@ -1792,12 +1728,8 @@
|
||||
"name": "user_fingerprint_user_id_user_id_fk",
|
||||
"tableFrom": "user_fingerprint",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1927,12 +1859,8 @@
|
||||
"name": "user_library_user_id_user_id_fk",
|
||||
"tableFrom": "user_library",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1940,12 +1868,8 @@
|
||||
"name": "user_library_game_id_game_id_fk",
|
||||
"tableFrom": "user_library",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2055,12 +1979,8 @@
|
||||
"name": "linked_account_user_id_user_id_fk",
|
||||
"tableFrom": "linked_account",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2249,12 +2169,8 @@
|
||||
"name": "verification_user_id_user_id_fk",
|
||||
"tableFrom": "verification",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2353,89 +2269,47 @@
|
||||
"public.device_grant_status": {
|
||||
"name": "device_grant_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"approved",
|
||||
"denied"
|
||||
]
|
||||
"values": ["pending", "approved", "denied"]
|
||||
},
|
||||
"public.box_state": {
|
||||
"name": "box_state",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"created",
|
||||
"running",
|
||||
"stopped"
|
||||
]
|
||||
"values": ["created", "running", "stopped"]
|
||||
},
|
||||
"public.box_tier": {
|
||||
"name": "box_tier",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"xs",
|
||||
"sm",
|
||||
"md",
|
||||
"lg",
|
||||
"xl"
|
||||
]
|
||||
"values": ["xs", "sm", "md", "lg", "xl"]
|
||||
},
|
||||
"public.depot_status": {
|
||||
"name": "depot_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"downloading",
|
||||
"complete",
|
||||
"error",
|
||||
"deleted"
|
||||
]
|
||||
"values": ["pending", "downloading", "complete", "error", "deleted"]
|
||||
},
|
||||
"public.game_download_status": {
|
||||
"name": "game_download_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"verifying",
|
||||
"downloading",
|
||||
"ready",
|
||||
"failed"
|
||||
]
|
||||
"values": ["pending", "verifying", "downloading", "ready", "failed"]
|
||||
},
|
||||
"public.session_state": {
|
||||
"name": "session_state",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"requested",
|
||||
"starting",
|
||||
"live",
|
||||
"ended",
|
||||
"failed"
|
||||
]
|
||||
"values": ["requested", "starting", "live", "ended", "failed"]
|
||||
},
|
||||
"public.team_member_role": {
|
||||
"name": "team_member_role",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"owner",
|
||||
"admin",
|
||||
"member"
|
||||
]
|
||||
"values": ["owner", "admin", "member"]
|
||||
},
|
||||
"public.linked_account_provider": {
|
||||
"name": "linked_account_provider",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"steam",
|
||||
"ssh",
|
||||
"discord"
|
||||
]
|
||||
"values": ["steam", "ssh", "discord"]
|
||||
},
|
||||
"public.verification_kind": {
|
||||
"name": "verification_kind",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"email"
|
||||
]
|
||||
"values": ["email"]
|
||||
}
|
||||
},
|
||||
"schemas": {},
|
||||
|
||||
@@ -123,12 +123,8 @@
|
||||
"name": "access_token_owner_user_id_user_id_fk",
|
||||
"tableFrom": "access_token",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -136,12 +132,8 @@
|
||||
"name": "access_token_team_id_team_id_fk",
|
||||
"tableFrom": "access_token",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -740,12 +732,8 @@
|
||||
"name": "box_user_id_user_id_fk",
|
||||
"tableFrom": "box",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -753,12 +741,8 @@
|
||||
"name": "box_machine_id_machine_id_fk",
|
||||
"tableFrom": "box",
|
||||
"tableTo": "machine",
|
||||
"columnsFrom": [
|
||||
"machine_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["machine_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -940,12 +924,8 @@
|
||||
"name": "game_depot_game_id_game_id_fk",
|
||||
"tableFrom": "game_depot",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1102,12 +1082,8 @@
|
||||
"name": "game_download_host_id_machine_id_fk",
|
||||
"tableFrom": "game_download",
|
||||
"tableTo": "machine",
|
||||
"columnsFrom": [
|
||||
"host_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["host_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1115,12 +1091,8 @@
|
||||
"name": "game_download_game_id_game_id_fk",
|
||||
"tableFrom": "game_download",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1356,9 +1328,7 @@
|
||||
"game_steam_app_id_unique": {
|
||||
"name": "game_steam_app_id_unique",
|
||||
"nullsNotDistinct": false,
|
||||
"columns": [
|
||||
"steam_app_id"
|
||||
]
|
||||
"columns": ["steam_app_id"]
|
||||
}
|
||||
},
|
||||
"policies": {},
|
||||
@@ -1478,12 +1448,8 @@
|
||||
"name": "machine_owner_user_id_user_id_fk",
|
||||
"tableFrom": "machine",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1491,12 +1457,8 @@
|
||||
"name": "machine_team_id_team_id_fk",
|
||||
"tableFrom": "machine",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1769,12 +1731,8 @@
|
||||
"name": "session_box_id_box_id_fk",
|
||||
"tableFrom": "session",
|
||||
"tableTo": "box",
|
||||
"columnsFrom": [
|
||||
"box_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["box_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1782,12 +1740,8 @@
|
||||
"name": "session_game_id_game_id_fk",
|
||||
"tableFrom": "session",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1795,12 +1749,8 @@
|
||||
"name": "session_linked_account_id_linked_account_id_fk",
|
||||
"tableFrom": "session",
|
||||
"tableTo": "linked_account",
|
||||
"columnsFrom": [
|
||||
"linked_account_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["linked_account_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1920,12 +1870,8 @@
|
||||
"name": "team_member_team_id_team_id_fk",
|
||||
"tableFrom": "team_member",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1933,12 +1879,8 @@
|
||||
"name": "team_member_user_id_user_id_fk",
|
||||
"tableFrom": "team_member",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2030,12 +1972,8 @@
|
||||
"name": "team_owner_id_user_id_fk",
|
||||
"tableFrom": "team",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2045,9 +1983,7 @@
|
||||
"team_slug_unique": {
|
||||
"name": "team_slug_unique",
|
||||
"nullsNotDistinct": false,
|
||||
"columns": [
|
||||
"slug"
|
||||
]
|
||||
"columns": ["slug"]
|
||||
}
|
||||
},
|
||||
"policies": {},
|
||||
@@ -2146,12 +2082,8 @@
|
||||
"name": "user_fingerprint_user_id_user_id_fk",
|
||||
"tableFrom": "user_fingerprint",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2281,12 +2213,8 @@
|
||||
"name": "user_library_user_id_user_id_fk",
|
||||
"tableFrom": "user_library",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -2294,12 +2222,8 @@
|
||||
"name": "user_library_game_id_game_id_fk",
|
||||
"tableFrom": "user_library",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2409,12 +2333,8 @@
|
||||
"name": "linked_account_user_id_user_id_fk",
|
||||
"tableFrom": "linked_account",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2603,12 +2523,8 @@
|
||||
"name": "verification_user_id_user_id_fk",
|
||||
"tableFrom": "verification",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2707,97 +2623,52 @@
|
||||
"public.device_grant_status": {
|
||||
"name": "device_grant_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"approved",
|
||||
"denied"
|
||||
]
|
||||
"values": ["pending", "approved", "denied"]
|
||||
},
|
||||
"public.auth_key_kind": {
|
||||
"name": "auth_key_kind",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"signing",
|
||||
"encryption"
|
||||
]
|
||||
"values": ["signing", "encryption"]
|
||||
},
|
||||
"public.box_state": {
|
||||
"name": "box_state",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"created",
|
||||
"running",
|
||||
"stopped"
|
||||
]
|
||||
"values": ["created", "running", "stopped"]
|
||||
},
|
||||
"public.box_tier": {
|
||||
"name": "box_tier",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"xs",
|
||||
"sm",
|
||||
"md",
|
||||
"lg",
|
||||
"xl"
|
||||
]
|
||||
"values": ["xs", "sm", "md", "lg", "xl"]
|
||||
},
|
||||
"public.depot_status": {
|
||||
"name": "depot_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"downloading",
|
||||
"complete",
|
||||
"error",
|
||||
"deleted"
|
||||
]
|
||||
"values": ["pending", "downloading", "complete", "error", "deleted"]
|
||||
},
|
||||
"public.game_download_status": {
|
||||
"name": "game_download_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"verifying",
|
||||
"downloading",
|
||||
"ready",
|
||||
"failed"
|
||||
]
|
||||
"values": ["pending", "verifying", "downloading", "ready", "failed"]
|
||||
},
|
||||
"public.session_state": {
|
||||
"name": "session_state",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"requested",
|
||||
"starting",
|
||||
"live",
|
||||
"ended",
|
||||
"failed"
|
||||
]
|
||||
"values": ["requested", "starting", "live", "ended", "failed"]
|
||||
},
|
||||
"public.team_member_role": {
|
||||
"name": "team_member_role",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"owner",
|
||||
"admin",
|
||||
"member"
|
||||
]
|
||||
"values": ["owner", "admin", "member"]
|
||||
},
|
||||
"public.linked_account_provider": {
|
||||
"name": "linked_account_provider",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"steam",
|
||||
"ssh",
|
||||
"discord"
|
||||
]
|
||||
"values": ["steam", "ssh", "discord"]
|
||||
},
|
||||
"public.verification_kind": {
|
||||
"name": "verification_kind",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"email"
|
||||
]
|
||||
"values": ["email"]
|
||||
}
|
||||
},
|
||||
"schemas": {},
|
||||
|
||||
@@ -123,12 +123,8 @@
|
||||
"name": "access_token_owner_user_id_user_id_fk",
|
||||
"tableFrom": "access_token",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -136,12 +132,8 @@
|
||||
"name": "access_token_team_id_team_id_fk",
|
||||
"tableFrom": "access_token",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -740,12 +732,8 @@
|
||||
"name": "box_user_id_user_id_fk",
|
||||
"tableFrom": "box",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -753,12 +741,8 @@
|
||||
"name": "box_machine_id_machine_id_fk",
|
||||
"tableFrom": "box",
|
||||
"tableTo": "machine",
|
||||
"columnsFrom": [
|
||||
"machine_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["machine_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -940,12 +924,8 @@
|
||||
"name": "game_depot_game_id_game_id_fk",
|
||||
"tableFrom": "game_depot",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1102,12 +1082,8 @@
|
||||
"name": "game_download_host_id_machine_id_fk",
|
||||
"tableFrom": "game_download",
|
||||
"tableTo": "machine",
|
||||
"columnsFrom": [
|
||||
"host_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["host_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1115,12 +1091,8 @@
|
||||
"name": "game_download_game_id_game_id_fk",
|
||||
"tableFrom": "game_download",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1356,9 +1328,7 @@
|
||||
"game_steam_app_id_unique": {
|
||||
"name": "game_steam_app_id_unique",
|
||||
"nullsNotDistinct": false,
|
||||
"columns": [
|
||||
"steam_app_id"
|
||||
]
|
||||
"columns": ["steam_app_id"]
|
||||
}
|
||||
},
|
||||
"policies": {},
|
||||
@@ -1478,12 +1448,8 @@
|
||||
"name": "machine_owner_user_id_user_id_fk",
|
||||
"tableFrom": "machine",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1491,12 +1457,8 @@
|
||||
"name": "machine_team_id_team_id_fk",
|
||||
"tableFrom": "machine",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1769,12 +1731,8 @@
|
||||
"name": "session_box_id_box_id_fk",
|
||||
"tableFrom": "session",
|
||||
"tableTo": "box",
|
||||
"columnsFrom": [
|
||||
"box_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["box_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1782,12 +1740,8 @@
|
||||
"name": "session_game_id_game_id_fk",
|
||||
"tableFrom": "session",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1795,12 +1749,8 @@
|
||||
"name": "session_linked_account_id_linked_account_id_fk",
|
||||
"tableFrom": "session",
|
||||
"tableTo": "linked_account",
|
||||
"columnsFrom": [
|
||||
"linked_account_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["linked_account_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1882,12 +1832,8 @@
|
||||
"name": "steam_enrolment_machine_id_machine_id_fk",
|
||||
"tableFrom": "steam_enrolment",
|
||||
"tableTo": "machine",
|
||||
"columnsFrom": [
|
||||
"machine_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["machine_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1895,12 +1841,8 @@
|
||||
"name": "steam_enrolment_user_id_user_id_fk",
|
||||
"tableFrom": "steam_enrolment",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1908,10 +1850,7 @@
|
||||
"compositePrimaryKeys": {
|
||||
"steam_enrolment_machine_id_user_id_pk": {
|
||||
"name": "steam_enrolment_machine_id_user_id_pk",
|
||||
"columns": [
|
||||
"machine_id",
|
||||
"user_id"
|
||||
]
|
||||
"columns": ["machine_id", "user_id"]
|
||||
}
|
||||
},
|
||||
"uniqueConstraints": {},
|
||||
@@ -2028,12 +1967,8 @@
|
||||
"name": "team_member_team_id_team_id_fk",
|
||||
"tableFrom": "team_member",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -2041,12 +1976,8 @@
|
||||
"name": "team_member_user_id_user_id_fk",
|
||||
"tableFrom": "team_member",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2138,12 +2069,8 @@
|
||||
"name": "team_owner_id_user_id_fk",
|
||||
"tableFrom": "team",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2153,9 +2080,7 @@
|
||||
"team_slug_unique": {
|
||||
"name": "team_slug_unique",
|
||||
"nullsNotDistinct": false,
|
||||
"columns": [
|
||||
"slug"
|
||||
]
|
||||
"columns": ["slug"]
|
||||
}
|
||||
},
|
||||
"policies": {},
|
||||
@@ -2254,12 +2179,8 @@
|
||||
"name": "user_fingerprint_user_id_user_id_fk",
|
||||
"tableFrom": "user_fingerprint",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2389,12 +2310,8 @@
|
||||
"name": "user_library_user_id_user_id_fk",
|
||||
"tableFrom": "user_library",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -2402,12 +2319,8 @@
|
||||
"name": "user_library_game_id_game_id_fk",
|
||||
"tableFrom": "user_library",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2517,12 +2430,8 @@
|
||||
"name": "linked_account_user_id_user_id_fk",
|
||||
"tableFrom": "linked_account",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2711,12 +2620,8 @@
|
||||
"name": "verification_user_id_user_id_fk",
|
||||
"tableFrom": "verification",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2815,106 +2720,57 @@
|
||||
"public.device_grant_status": {
|
||||
"name": "device_grant_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"approved",
|
||||
"denied"
|
||||
]
|
||||
"values": ["pending", "approved", "denied"]
|
||||
},
|
||||
"public.auth_key_kind": {
|
||||
"name": "auth_key_kind",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"signing",
|
||||
"encryption"
|
||||
]
|
||||
"values": ["signing", "encryption"]
|
||||
},
|
||||
"public.box_state": {
|
||||
"name": "box_state",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"created",
|
||||
"running",
|
||||
"stopped"
|
||||
]
|
||||
"values": ["created", "running", "stopped"]
|
||||
},
|
||||
"public.box_tier": {
|
||||
"name": "box_tier",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"xs",
|
||||
"sm",
|
||||
"md",
|
||||
"lg",
|
||||
"xl"
|
||||
]
|
||||
"values": ["xs", "sm", "md", "lg", "xl"]
|
||||
},
|
||||
"public.depot_status": {
|
||||
"name": "depot_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"downloading",
|
||||
"complete",
|
||||
"error",
|
||||
"deleted"
|
||||
]
|
||||
"values": ["pending", "downloading", "complete", "error", "deleted"]
|
||||
},
|
||||
"public.game_download_status": {
|
||||
"name": "game_download_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"verifying",
|
||||
"downloading",
|
||||
"ready",
|
||||
"failed"
|
||||
]
|
||||
"values": ["pending", "verifying", "downloading", "ready", "failed"]
|
||||
},
|
||||
"public.session_state": {
|
||||
"name": "session_state",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"requested",
|
||||
"starting",
|
||||
"live",
|
||||
"ended",
|
||||
"failed"
|
||||
]
|
||||
"values": ["requested", "starting", "live", "ended", "failed"]
|
||||
},
|
||||
"public.steam_enrolment_state": {
|
||||
"name": "steam_enrolment_state",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"enrolled",
|
||||
"stale",
|
||||
"revoked"
|
||||
]
|
||||
"values": ["enrolled", "stale", "revoked"]
|
||||
},
|
||||
"public.team_member_role": {
|
||||
"name": "team_member_role",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"owner",
|
||||
"admin",
|
||||
"member"
|
||||
]
|
||||
"values": ["owner", "admin", "member"]
|
||||
},
|
||||
"public.linked_account_provider": {
|
||||
"name": "linked_account_provider",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"steam",
|
||||
"ssh",
|
||||
"discord"
|
||||
]
|
||||
"values": ["steam", "ssh", "discord"]
|
||||
},
|
||||
"public.verification_kind": {
|
||||
"name": "verification_kind",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"email"
|
||||
]
|
||||
"values": ["email"]
|
||||
}
|
||||
},
|
||||
"schemas": {},
|
||||
|
||||
@@ -123,12 +123,8 @@
|
||||
"name": "access_token_owner_user_id_user_id_fk",
|
||||
"tableFrom": "access_token",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -136,12 +132,8 @@
|
||||
"name": "access_token_team_id_team_id_fk",
|
||||
"tableFrom": "access_token",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -740,12 +732,8 @@
|
||||
"name": "box_user_id_user_id_fk",
|
||||
"tableFrom": "box",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -753,12 +741,8 @@
|
||||
"name": "box_machine_id_machine_id_fk",
|
||||
"tableFrom": "box",
|
||||
"tableTo": "machine",
|
||||
"columnsFrom": [
|
||||
"machine_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["machine_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -940,12 +924,8 @@
|
||||
"name": "game_depot_game_id_game_id_fk",
|
||||
"tableFrom": "game_depot",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1102,12 +1082,8 @@
|
||||
"name": "game_download_host_id_machine_id_fk",
|
||||
"tableFrom": "game_download",
|
||||
"tableTo": "machine",
|
||||
"columnsFrom": [
|
||||
"host_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["host_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1115,12 +1091,8 @@
|
||||
"name": "game_download_game_id_game_id_fk",
|
||||
"tableFrom": "game_download",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1356,9 +1328,7 @@
|
||||
"game_steam_app_id_unique": {
|
||||
"name": "game_steam_app_id_unique",
|
||||
"nullsNotDistinct": false,
|
||||
"columns": [
|
||||
"steam_app_id"
|
||||
]
|
||||
"columns": ["steam_app_id"]
|
||||
}
|
||||
},
|
||||
"policies": {},
|
||||
@@ -1499,12 +1469,8 @@
|
||||
"name": "machine_owner_user_id_user_id_fk",
|
||||
"tableFrom": "machine",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1512,12 +1478,8 @@
|
||||
"name": "machine_team_id_team_id_fk",
|
||||
"tableFrom": "machine",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1790,12 +1752,8 @@
|
||||
"name": "session_box_id_box_id_fk",
|
||||
"tableFrom": "session",
|
||||
"tableTo": "box",
|
||||
"columnsFrom": [
|
||||
"box_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["box_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1803,12 +1761,8 @@
|
||||
"name": "session_game_id_game_id_fk",
|
||||
"tableFrom": "session",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1816,12 +1770,8 @@
|
||||
"name": "session_linked_account_id_linked_account_id_fk",
|
||||
"tableFrom": "session",
|
||||
"tableTo": "linked_account",
|
||||
"columnsFrom": [
|
||||
"linked_account_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["linked_account_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1903,12 +1853,8 @@
|
||||
"name": "steam_enrolment_machine_id_machine_id_fk",
|
||||
"tableFrom": "steam_enrolment",
|
||||
"tableTo": "machine",
|
||||
"columnsFrom": [
|
||||
"machine_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["machine_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1916,12 +1862,8 @@
|
||||
"name": "steam_enrolment_user_id_user_id_fk",
|
||||
"tableFrom": "steam_enrolment",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1929,10 +1871,7 @@
|
||||
"compositePrimaryKeys": {
|
||||
"steam_enrolment_machine_id_user_id_pk": {
|
||||
"name": "steam_enrolment_machine_id_user_id_pk",
|
||||
"columns": [
|
||||
"machine_id",
|
||||
"user_id"
|
||||
]
|
||||
"columns": ["machine_id", "user_id"]
|
||||
}
|
||||
},
|
||||
"uniqueConstraints": {},
|
||||
@@ -2049,12 +1988,8 @@
|
||||
"name": "team_member_team_id_team_id_fk",
|
||||
"tableFrom": "team_member",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -2062,12 +1997,8 @@
|
||||
"name": "team_member_user_id_user_id_fk",
|
||||
"tableFrom": "team_member",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2159,12 +2090,8 @@
|
||||
"name": "team_owner_id_user_id_fk",
|
||||
"tableFrom": "team",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2174,9 +2101,7 @@
|
||||
"team_slug_unique": {
|
||||
"name": "team_slug_unique",
|
||||
"nullsNotDistinct": false,
|
||||
"columns": [
|
||||
"slug"
|
||||
]
|
||||
"columns": ["slug"]
|
||||
}
|
||||
},
|
||||
"policies": {},
|
||||
@@ -2275,12 +2200,8 @@
|
||||
"name": "user_fingerprint_user_id_user_id_fk",
|
||||
"tableFrom": "user_fingerprint",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2410,12 +2331,8 @@
|
||||
"name": "user_library_user_id_user_id_fk",
|
||||
"tableFrom": "user_library",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -2423,12 +2340,8 @@
|
||||
"name": "user_library_game_id_game_id_fk",
|
||||
"tableFrom": "user_library",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2538,12 +2451,8 @@
|
||||
"name": "linked_account_user_id_user_id_fk",
|
||||
"tableFrom": "linked_account",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2732,12 +2641,8 @@
|
||||
"name": "verification_user_id_user_id_fk",
|
||||
"tableFrom": "verification",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2836,106 +2741,57 @@
|
||||
"public.device_grant_status": {
|
||||
"name": "device_grant_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"approved",
|
||||
"denied"
|
||||
]
|
||||
"values": ["pending", "approved", "denied"]
|
||||
},
|
||||
"public.auth_key_kind": {
|
||||
"name": "auth_key_kind",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"signing",
|
||||
"encryption"
|
||||
]
|
||||
"values": ["signing", "encryption"]
|
||||
},
|
||||
"public.box_state": {
|
||||
"name": "box_state",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"created",
|
||||
"running",
|
||||
"stopped"
|
||||
]
|
||||
"values": ["created", "running", "stopped"]
|
||||
},
|
||||
"public.box_tier": {
|
||||
"name": "box_tier",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"xs",
|
||||
"sm",
|
||||
"md",
|
||||
"lg",
|
||||
"xl"
|
||||
]
|
||||
"values": ["xs", "sm", "md", "lg", "xl"]
|
||||
},
|
||||
"public.depot_status": {
|
||||
"name": "depot_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"downloading",
|
||||
"complete",
|
||||
"error",
|
||||
"deleted"
|
||||
]
|
||||
"values": ["pending", "downloading", "complete", "error", "deleted"]
|
||||
},
|
||||
"public.game_download_status": {
|
||||
"name": "game_download_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"verifying",
|
||||
"downloading",
|
||||
"ready",
|
||||
"failed"
|
||||
]
|
||||
"values": ["pending", "verifying", "downloading", "ready", "failed"]
|
||||
},
|
||||
"public.session_state": {
|
||||
"name": "session_state",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"requested",
|
||||
"starting",
|
||||
"live",
|
||||
"ended",
|
||||
"failed"
|
||||
]
|
||||
"values": ["requested", "starting", "live", "ended", "failed"]
|
||||
},
|
||||
"public.steam_enrolment_state": {
|
||||
"name": "steam_enrolment_state",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"enrolled",
|
||||
"stale",
|
||||
"revoked"
|
||||
]
|
||||
"values": ["enrolled", "stale", "revoked"]
|
||||
},
|
||||
"public.team_member_role": {
|
||||
"name": "team_member_role",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"owner",
|
||||
"admin",
|
||||
"member"
|
||||
]
|
||||
"values": ["owner", "admin", "member"]
|
||||
},
|
||||
"public.linked_account_provider": {
|
||||
"name": "linked_account_provider",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"steam",
|
||||
"ssh",
|
||||
"discord"
|
||||
]
|
||||
"values": ["steam", "ssh", "discord"]
|
||||
},
|
||||
"public.verification_kind": {
|
||||
"name": "verification_kind",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"email"
|
||||
]
|
||||
"values": ["email"]
|
||||
}
|
||||
},
|
||||
"schemas": {},
|
||||
|
||||
@@ -123,12 +123,8 @@
|
||||
"name": "access_token_owner_user_id_user_id_fk",
|
||||
"tableFrom": "access_token",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -136,12 +132,8 @@
|
||||
"name": "access_token_team_id_team_id_fk",
|
||||
"tableFrom": "access_token",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -740,12 +732,8 @@
|
||||
"name": "box_user_id_user_id_fk",
|
||||
"tableFrom": "box",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -753,12 +741,8 @@
|
||||
"name": "box_machine_id_machine_id_fk",
|
||||
"tableFrom": "box",
|
||||
"tableTo": "machine",
|
||||
"columnsFrom": [
|
||||
"machine_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["machine_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -940,12 +924,8 @@
|
||||
"name": "game_depot_game_id_game_id_fk",
|
||||
"tableFrom": "game_depot",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1102,12 +1082,8 @@
|
||||
"name": "game_download_host_id_machine_id_fk",
|
||||
"tableFrom": "game_download",
|
||||
"tableTo": "machine",
|
||||
"columnsFrom": [
|
||||
"host_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["host_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1115,12 +1091,8 @@
|
||||
"name": "game_download_game_id_game_id_fk",
|
||||
"tableFrom": "game_download",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1356,9 +1328,7 @@
|
||||
"game_steam_app_id_unique": {
|
||||
"name": "game_steam_app_id_unique",
|
||||
"nullsNotDistinct": false,
|
||||
"columns": [
|
||||
"steam_app_id"
|
||||
]
|
||||
"columns": ["steam_app_id"]
|
||||
}
|
||||
},
|
||||
"policies": {},
|
||||
@@ -1520,12 +1490,8 @@
|
||||
"name": "machine_owner_user_id_user_id_fk",
|
||||
"tableFrom": "machine",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1533,12 +1499,8 @@
|
||||
"name": "machine_team_id_team_id_fk",
|
||||
"tableFrom": "machine",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1811,12 +1773,8 @@
|
||||
"name": "session_box_id_box_id_fk",
|
||||
"tableFrom": "session",
|
||||
"tableTo": "box",
|
||||
"columnsFrom": [
|
||||
"box_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["box_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1824,12 +1782,8 @@
|
||||
"name": "session_game_id_game_id_fk",
|
||||
"tableFrom": "session",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1837,12 +1791,8 @@
|
||||
"name": "session_linked_account_id_linked_account_id_fk",
|
||||
"tableFrom": "session",
|
||||
"tableTo": "linked_account",
|
||||
"columnsFrom": [
|
||||
"linked_account_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["linked_account_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "restrict",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1924,12 +1874,8 @@
|
||||
"name": "steam_enrolment_machine_id_machine_id_fk",
|
||||
"tableFrom": "steam_enrolment",
|
||||
"tableTo": "machine",
|
||||
"columnsFrom": [
|
||||
"machine_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["machine_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -1937,12 +1883,8 @@
|
||||
"name": "steam_enrolment_user_id_user_id_fk",
|
||||
"tableFrom": "steam_enrolment",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -1950,10 +1892,7 @@
|
||||
"compositePrimaryKeys": {
|
||||
"steam_enrolment_machine_id_user_id_pk": {
|
||||
"name": "steam_enrolment_machine_id_user_id_pk",
|
||||
"columns": [
|
||||
"machine_id",
|
||||
"user_id"
|
||||
]
|
||||
"columns": ["machine_id", "user_id"]
|
||||
}
|
||||
},
|
||||
"uniqueConstraints": {},
|
||||
@@ -2070,12 +2009,8 @@
|
||||
"name": "team_member_team_id_team_id_fk",
|
||||
"tableFrom": "team_member",
|
||||
"tableTo": "team",
|
||||
"columnsFrom": [
|
||||
"team_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["team_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -2083,12 +2018,8 @@
|
||||
"name": "team_member_user_id_user_id_fk",
|
||||
"tableFrom": "team_member",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2180,12 +2111,8 @@
|
||||
"name": "team_owner_id_user_id_fk",
|
||||
"tableFrom": "team",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"owner_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["owner_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2195,9 +2122,7 @@
|
||||
"team_slug_unique": {
|
||||
"name": "team_slug_unique",
|
||||
"nullsNotDistinct": false,
|
||||
"columns": [
|
||||
"slug"
|
||||
]
|
||||
"columns": ["slug"]
|
||||
}
|
||||
},
|
||||
"policies": {},
|
||||
@@ -2296,12 +2221,8 @@
|
||||
"name": "user_fingerprint_user_id_user_id_fk",
|
||||
"tableFrom": "user_fingerprint",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2431,12 +2352,8 @@
|
||||
"name": "user_library_user_id_user_id_fk",
|
||||
"tableFrom": "user_library",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
@@ -2444,12 +2361,8 @@
|
||||
"name": "user_library_game_id_game_id_fk",
|
||||
"tableFrom": "user_library",
|
||||
"tableTo": "game",
|
||||
"columnsFrom": [
|
||||
"game_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["game_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2559,12 +2472,8 @@
|
||||
"name": "linked_account_user_id_user_id_fk",
|
||||
"tableFrom": "linked_account",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2753,12 +2662,8 @@
|
||||
"name": "verification_user_id_user_id_fk",
|
||||
"tableFrom": "verification",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"columnsFrom": ["user_id"],
|
||||
"columnsTo": ["id"],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
@@ -2857,106 +2762,57 @@
|
||||
"public.device_grant_status": {
|
||||
"name": "device_grant_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"approved",
|
||||
"denied"
|
||||
]
|
||||
"values": ["pending", "approved", "denied"]
|
||||
},
|
||||
"public.auth_key_kind": {
|
||||
"name": "auth_key_kind",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"signing",
|
||||
"encryption"
|
||||
]
|
||||
"values": ["signing", "encryption"]
|
||||
},
|
||||
"public.box_state": {
|
||||
"name": "box_state",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"created",
|
||||
"running",
|
||||
"stopped"
|
||||
]
|
||||
"values": ["created", "running", "stopped"]
|
||||
},
|
||||
"public.box_tier": {
|
||||
"name": "box_tier",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"xs",
|
||||
"sm",
|
||||
"md",
|
||||
"lg",
|
||||
"xl"
|
||||
]
|
||||
"values": ["xs", "sm", "md", "lg", "xl"]
|
||||
},
|
||||
"public.depot_status": {
|
||||
"name": "depot_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"downloading",
|
||||
"complete",
|
||||
"error",
|
||||
"deleted"
|
||||
]
|
||||
"values": ["pending", "downloading", "complete", "error", "deleted"]
|
||||
},
|
||||
"public.game_download_status": {
|
||||
"name": "game_download_status",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"pending",
|
||||
"verifying",
|
||||
"downloading",
|
||||
"ready",
|
||||
"failed"
|
||||
]
|
||||
"values": ["pending", "verifying", "downloading", "ready", "failed"]
|
||||
},
|
||||
"public.session_state": {
|
||||
"name": "session_state",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"requested",
|
||||
"starting",
|
||||
"live",
|
||||
"ended",
|
||||
"failed"
|
||||
]
|
||||
"values": ["requested", "starting", "live", "ended", "failed"]
|
||||
},
|
||||
"public.steam_enrolment_state": {
|
||||
"name": "steam_enrolment_state",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"enrolled",
|
||||
"stale",
|
||||
"revoked"
|
||||
]
|
||||
"values": ["enrolled", "stale", "revoked"]
|
||||
},
|
||||
"public.team_member_role": {
|
||||
"name": "team_member_role",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"owner",
|
||||
"admin",
|
||||
"member"
|
||||
]
|
||||
"values": ["owner", "admin", "member"]
|
||||
},
|
||||
"public.linked_account_provider": {
|
||||
"name": "linked_account_provider",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"steam",
|
||||
"ssh",
|
||||
"discord"
|
||||
]
|
||||
"values": ["steam", "ssh", "discord"]
|
||||
},
|
||||
"public.verification_kind": {
|
||||
"name": "verification_kind",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"email"
|
||||
]
|
||||
"values": ["email"]
|
||||
}
|
||||
},
|
||||
"schemas": {},
|
||||
|
||||
@@ -24,9 +24,9 @@ const out = path.join(here, '..', 'src', 'migrations.generated.ts');
|
||||
|
||||
type JournalEntry = { idx: number; when: number; tag: string; breakpoints: boolean };
|
||||
|
||||
const journal = JSON.parse(
|
||||
fs.readFileSync(path.join(folder, 'meta', '_journal.json'), 'utf8')
|
||||
) as { entries: JournalEntry[] };
|
||||
const journal = JSON.parse(fs.readFileSync(path.join(folder, 'meta', '_journal.json'), 'utf8')) as {
|
||||
entries: JournalEntry[];
|
||||
};
|
||||
|
||||
// Deliberately identical to drizzle-orm's own `readMigrationFiles`: the same
|
||||
// `--> statement-breakpoint` split, the same sha256 over the whole file, the
|
||||
|
||||
@@ -86,7 +86,8 @@ describe('PostgresCodeStore', () => {
|
||||
|
||||
await store.create(hash(), record(), 60);
|
||||
|
||||
const [row] = await sql`select count(*)::int as n from authorization_code where code_hash = ${stale}`;
|
||||
const [row] =
|
||||
await sql`select count(*)::int as n from authorization_code where code_hash = ${stale}`;
|
||||
expect(row!.n).toBe(0);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -3,8 +3,8 @@ import { afterAll, describe, expect, test } from 'bun:test';
|
||||
import { Fixtures } from '../db/fixtures.js';
|
||||
import { testDb } from '../db/test.js';
|
||||
import { Identifier } from '../id.js';
|
||||
import { Placement } from './placement.js';
|
||||
import { Box } from './index.js';
|
||||
import { Placement } from './placement.js';
|
||||
|
||||
const sql = testDb();
|
||||
|
||||
@@ -46,9 +46,7 @@ describe('Placement', () => {
|
||||
|
||||
// `box.machineId` is notNull, so a placer with no candidate must refuse
|
||||
// rather than hand back something the insert would reject.
|
||||
await expect(
|
||||
Placement.choose({ userId: owner.userId, tier: 'sm' })
|
||||
).rejects.toThrow();
|
||||
await expect(Placement.choose({ userId: owner.userId, tier: 'sm' })).rejects.toThrow();
|
||||
});
|
||||
|
||||
test('more than one candidate is refused rather than picked silently', async () => {
|
||||
@@ -59,9 +57,7 @@ describe('Placement', () => {
|
||||
// There is no policy for choosing between hosts yet. Inventing one here
|
||||
// is how a placement decision ends up buried in the caller: the refusal
|
||||
// is what keeps the choice in one replaceable place.
|
||||
await expect(
|
||||
Placement.choose({ userId: owner.userId, tier: 'sm' })
|
||||
).rejects.toThrow();
|
||||
await expect(Placement.choose({ userId: owner.userId, tier: 'sm' })).rejects.toThrow();
|
||||
});
|
||||
|
||||
test('the placer is swappable without touching box creation', async () => {
|
||||
|
||||
@@ -127,10 +127,7 @@ export namespace Database {
|
||||
// callback ran on — harmless by luck, since neither was a real
|
||||
// transaction, and twice the pools either way.
|
||||
const db = client();
|
||||
const result = await TransactionContext.provide(
|
||||
{ effects, tx: db },
|
||||
() => callback(db)
|
||||
);
|
||||
const result = await TransactionContext.provide({ effects, tx: db }, () => callback(db));
|
||||
await Promise.all(effects.map((x) => x()));
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -344,7 +344,13 @@ describe('Session claim', () => {
|
||||
test('re-reporting the state you already reported changes nothing', async () => {
|
||||
const { machineId, session } = await requested('ses-repeat', 5424);
|
||||
|
||||
await Session.transition({ claimToken: HOLDER, id: session.id, machineId, state: 'starting', errorMessage: null });
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
state: 'starting',
|
||||
errorMessage: null
|
||||
});
|
||||
const again = await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
@@ -373,8 +379,20 @@ describe('Session claim', () => {
|
||||
expect(skipped.outcome).toBe('illegal');
|
||||
expect((await Session.fromID(session.id))?.state).toBe('requested');
|
||||
|
||||
await Session.transition({ claimToken: HOLDER, id: session.id, machineId, state: 'starting', errorMessage: null });
|
||||
await Session.transition({ claimToken: HOLDER, id: session.id, machineId, state: 'failed', errorMessage: 'no' });
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
state: 'starting',
|
||||
errorMessage: null
|
||||
});
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
state: 'failed',
|
||||
errorMessage: 'no'
|
||||
});
|
||||
|
||||
// Terminal is terminal: a dead session cannot be resurrected.
|
||||
const raised = await Session.transition({
|
||||
@@ -390,7 +408,13 @@ describe('Session claim', () => {
|
||||
|
||||
test('the timestamps survive a duplicate report, which is what billing rests on', async () => {
|
||||
const { machineId, session } = await requested('ses-idempotent', 5426);
|
||||
await Session.transition({ claimToken: HOLDER, id: session.id, machineId, state: 'starting', errorMessage: null });
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
state: 'starting',
|
||||
errorMessage: null
|
||||
});
|
||||
const live = await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
@@ -414,7 +438,13 @@ describe('Session claim', () => {
|
||||
const { machineId, session } = await requested('ses-ticket-scope', 5427);
|
||||
const other = await scene('ses-ticket-other', 5428);
|
||||
|
||||
await Session.transition({ claimToken: HOLDER, id: session.id, machineId, state: 'starting', errorMessage: null });
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
state: 'starting',
|
||||
errorMessage: null
|
||||
});
|
||||
|
||||
const refused = await Session.publishTicket({
|
||||
claimToken: HOLDER,
|
||||
@@ -426,12 +456,22 @@ describe('Session claim', () => {
|
||||
expect((await Session.fromID(session.id))?.ticket).toBeNull();
|
||||
|
||||
// A ticket may appear while the state is still `starting`.
|
||||
const first = await Session.publishTicket({ claimToken: HOLDER, id: session.id, machineId, ticket: 'one' });
|
||||
const first = await Session.publishTicket({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
ticket: 'one'
|
||||
});
|
||||
expect(first.outcome).toBe('published');
|
||||
expect(first.session?.ticket).toBe('one');
|
||||
expect(first.session?.state).toBe('starting');
|
||||
|
||||
const second = await Session.publishTicket({ claimToken: HOLDER, id: session.id, machineId, ticket: 'two' });
|
||||
const second = await Session.publishTicket({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
ticket: 'two'
|
||||
});
|
||||
expect(second.session?.ticket).toBe('two');
|
||||
});
|
||||
|
||||
@@ -691,11 +731,34 @@ describe('Session claim', () => {
|
||||
|
||||
test('a stopped session has no address to publish', async () => {
|
||||
const { machineId, session } = await requested('ses-ticket-dead', 5429);
|
||||
await Session.transition({ claimToken: HOLDER, id: session.id, machineId, state: 'starting', errorMessage: null });
|
||||
await Session.transition({ claimToken: HOLDER, id: session.id, machineId, state: 'live', errorMessage: null });
|
||||
await Session.transition({ claimToken: HOLDER, id: session.id, machineId, state: 'ended', errorMessage: null });
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
state: 'starting',
|
||||
errorMessage: null
|
||||
});
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
state: 'live',
|
||||
errorMessage: null
|
||||
});
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
state: 'ended',
|
||||
errorMessage: null
|
||||
});
|
||||
|
||||
const result = await Session.publishTicket({ claimToken: HOLDER, id: session.id, machineId, ticket: 'late' });
|
||||
const result = await Session.publishTicket({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
ticket: 'late'
|
||||
});
|
||||
expect(result.outcome).toBe('closed');
|
||||
expect((await Session.fromID(session.id))?.ticket).toBeNull();
|
||||
});
|
||||
@@ -739,9 +802,27 @@ describe('Session one active run per box', () => {
|
||||
});
|
||||
|
||||
const first = await mk();
|
||||
await Session.transition({ claimToken: HOLDER, id: first.id, machineId, state: 'starting', errorMessage: null });
|
||||
await Session.transition({ claimToken: HOLDER, id: first.id, machineId, state: 'live', errorMessage: null });
|
||||
await Session.transition({ claimToken: HOLDER, id: first.id, machineId, state: 'ended', errorMessage: null });
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: first.id,
|
||||
machineId,
|
||||
state: 'starting',
|
||||
errorMessage: null
|
||||
});
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: first.id,
|
||||
machineId,
|
||||
state: 'live',
|
||||
errorMessage: null
|
||||
});
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: first.id,
|
||||
machineId,
|
||||
state: 'ended',
|
||||
errorMessage: null
|
||||
});
|
||||
|
||||
// The index is partial for exactly this reason: a box is a durable
|
||||
// thing and playing twice is the ordinary case, so a stopped run must
|
||||
@@ -755,11 +836,29 @@ describe('Session one active run per box', () => {
|
||||
describe('Session tickets and the end of a run', () => {
|
||||
test('stopping a run takes its address away', async () => {
|
||||
const { machineId, session } = await requestedRun('ses-ticket-cleared', 5452);
|
||||
await Session.transition({ claimToken: HOLDER, id: session.id, machineId, state: 'starting', errorMessage: null });
|
||||
await Session.transition({ claimToken: HOLDER, id: session.id, machineId, state: 'live', errorMessage: null });
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
state: 'starting',
|
||||
errorMessage: null
|
||||
});
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
state: 'live',
|
||||
errorMessage: null
|
||||
});
|
||||
expect(
|
||||
(await Session.publishTicket({ claimToken: HOLDER, id: session.id, machineId, ticket: 'live-address' })).session
|
||||
?.ticket
|
||||
(
|
||||
await Session.publishTicket({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
ticket: 'live-address'
|
||||
})
|
||||
).session?.ticket
|
||||
).toBe('live-address');
|
||||
|
||||
const ended = await Session.transition({
|
||||
@@ -779,8 +878,19 @@ describe('Session tickets and the end of a run', () => {
|
||||
|
||||
test('a run that failed does not keep an address either', async () => {
|
||||
const { machineId, session } = await requestedRun('ses-ticket-cleared-fail', 5453);
|
||||
await Session.transition({ claimToken: HOLDER, id: session.id, machineId, state: 'starting', errorMessage: null });
|
||||
await Session.publishTicket({ claimToken: HOLDER, id: session.id, machineId, ticket: 'starting-address' });
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
state: 'starting',
|
||||
errorMessage: null
|
||||
});
|
||||
await Session.publishTicket({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
ticket: 'starting-address'
|
||||
});
|
||||
|
||||
const failed = await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
@@ -814,12 +924,24 @@ describe('Session and the box underneath it', () => {
|
||||
// `created` while a run on it was `live`.
|
||||
expect((await Box.fromID(box.id))?.state).toBe('created');
|
||||
|
||||
await Session.transition({ claimToken: HOLDER, id: session.id, machineId, state: 'starting', errorMessage: null });
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
state: 'starting',
|
||||
errorMessage: null
|
||||
});
|
||||
// `starting` is deliberately not a box state: that transition is
|
||||
// synchronous from the agent's side, so nothing would ever write it.
|
||||
expect((await Box.fromID(box.id))?.state).toBe('created');
|
||||
|
||||
await Session.transition({ claimToken: HOLDER, id: session.id, machineId, state: 'live', errorMessage: null });
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
state: 'live',
|
||||
errorMessage: null
|
||||
});
|
||||
const running = await Box.fromID(box.id);
|
||||
expect(running?.state).toBe('running');
|
||||
expect(running?.stopReason).toBeNull();
|
||||
@@ -828,9 +950,27 @@ describe('Session and the box underneath it', () => {
|
||||
|
||||
test('a run that ends stops its box, cleanly', async () => {
|
||||
const { machineId, box, session } = await requestedRun('ses-box-ended', 5461);
|
||||
await Session.transition({ claimToken: HOLDER, id: session.id, machineId, state: 'starting', errorMessage: null });
|
||||
await Session.transition({ claimToken: HOLDER, id: session.id, machineId, state: 'live', errorMessage: null });
|
||||
await Session.transition({ claimToken: HOLDER, id: session.id, machineId, state: 'ended', errorMessage: null });
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
state: 'starting',
|
||||
errorMessage: null
|
||||
});
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
state: 'live',
|
||||
errorMessage: null
|
||||
});
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
state: 'ended',
|
||||
errorMessage: null
|
||||
});
|
||||
|
||||
const stopped = await Box.fromID(box.id);
|
||||
expect(stopped?.state).toBe('stopped');
|
||||
@@ -840,7 +980,13 @@ describe('Session and the box underneath it', () => {
|
||||
|
||||
test('a run that fails stops its box in the words the agent used', async () => {
|
||||
const { machineId, box, session } = await requestedRun('ses-box-failed', 5462);
|
||||
await Session.transition({ claimToken: HOLDER, id: session.id, machineId, state: 'starting', errorMessage: null });
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
state: 'starting',
|
||||
errorMessage: null
|
||||
});
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
@@ -891,24 +1037,68 @@ describe('Session tickets need a claim first', () => {
|
||||
// A ticket is the address of something being brought up, so publishing
|
||||
// one for a `requested` run means the agent skipped the claim — the
|
||||
// step that is the only mutual exclusion in the design.
|
||||
const early = await Session.publishTicket({ claimToken: HOLDER, id: session.id, machineId, ticket: 'too-soon' });
|
||||
const early = await Session.publishTicket({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
ticket: 'too-soon'
|
||||
});
|
||||
expect(early.outcome).toBe('unclaimed');
|
||||
expect((await Session.fromID(session.id))?.ticket).toBeNull();
|
||||
|
||||
await Session.transition({ claimToken: HOLDER, id: session.id, machineId, state: 'starting', errorMessage: null });
|
||||
const now = await Session.publishTicket({ claimToken: HOLDER, id: session.id, machineId, ticket: 'in-time' });
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
state: 'starting',
|
||||
errorMessage: null
|
||||
});
|
||||
const now = await Session.publishTicket({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
ticket: 'in-time'
|
||||
});
|
||||
expect(now.outcome).toBe('published');
|
||||
expect(now.session?.ticket).toBe('in-time');
|
||||
});
|
||||
|
||||
test('the two refusals are different answers, because they are different mistakes', async () => {
|
||||
const { machineId, session } = await requestedRun('ses-ticket-refusals', 5466);
|
||||
const unclaimed = await Session.publishTicket({ claimToken: HOLDER, id: session.id, machineId, ticket: 'a' });
|
||||
const unclaimed = await Session.publishTicket({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
ticket: 'a'
|
||||
});
|
||||
|
||||
await Session.transition({ claimToken: HOLDER, id: session.id, machineId, state: 'starting', errorMessage: null });
|
||||
await Session.transition({ claimToken: HOLDER, id: session.id, machineId, state: 'live', errorMessage: null });
|
||||
await Session.transition({ claimToken: HOLDER, id: session.id, machineId, state: 'ended', errorMessage: null });
|
||||
const closed = await Session.publishTicket({ claimToken: HOLDER, id: session.id, machineId, ticket: 'b' });
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
state: 'starting',
|
||||
errorMessage: null
|
||||
});
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
state: 'live',
|
||||
errorMessage: null
|
||||
});
|
||||
await Session.transition({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
state: 'ended',
|
||||
errorMessage: null
|
||||
});
|
||||
const closed = await Session.publishTicket({
|
||||
claimToken: HOLDER,
|
||||
id: session.id,
|
||||
machineId,
|
||||
ticket: 'b'
|
||||
});
|
||||
|
||||
// One is an agent that has not claimed the work; the other is a run
|
||||
// with nothing left to reach. Collapsing them would tell an agent
|
||||
|
||||
@@ -4,8 +4,8 @@ import { Actor } from '../actor.js';
|
||||
import { Fixtures } from '../db/fixtures.js';
|
||||
import { testDb } from '../db/test.js';
|
||||
import { Identifier } from '../id.js';
|
||||
import { Member } from './member.js';
|
||||
import { Team } from './index.js';
|
||||
import { Member } from './member.js';
|
||||
|
||||
const sql = testDb();
|
||||
|
||||
@@ -44,7 +44,10 @@ describe('Team.ensurePersonal', () => {
|
||||
// the user is created — that is what backfills accounts made before the
|
||||
// call existed. A second call must not mint a second team.
|
||||
const again = await Actor.with(
|
||||
{ type: 'user', properties: { userID: owner.userId, linkedAccountID: owner.linkedAccountId } },
|
||||
{
|
||||
type: 'user',
|
||||
properties: { userID: owner.userId, linkedAccountID: owner.linkedAccountId }
|
||||
},
|
||||
() => Team.ensurePersonal({ displayName: 'team-idempotent' })
|
||||
);
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ import { ErrorCodes, VisibleError } from '../error.js';
|
||||
import { fn } from '../fn.js';
|
||||
import { Identifier } from '../id.js';
|
||||
import { User } from './index.js';
|
||||
import { UserTable } from './user.sql.js';
|
||||
import { LinkedAccount } from './linked-account.js';
|
||||
import { LinkedAccountTable } from './linked-account.sql.js';
|
||||
import { UserTable } from './user.sql.js';
|
||||
|
||||
const STEAM_ID_RE = /^\d{17}$/;
|
||||
|
||||
|
||||
@@ -40,7 +40,9 @@ export namespace Waitlist {
|
||||
return tx
|
||||
.select()
|
||||
.from(WaitlistEntryTable)
|
||||
.where(and(eq(WaitlistEntryTable.email, input.email), isNull(WaitlistEntryTable.timeDeleted)))
|
||||
.where(
|
||||
and(eq(WaitlistEntryTable.email, input.email), isNull(WaitlistEntryTable.timeDeleted))
|
||||
)
|
||||
.then((rows) => rows.at(0) ?? null);
|
||||
});
|
||||
if (existing) {
|
||||
|
||||
Reference in New Issue
Block a user