Database tables for teams and repos
This page lists the columns of teams, people, invites, join_requests, projects, repo_requests and repos. Database tables says how to read the columns.
One row for each team. Most tables that hold a team’s data carry its team_id. A few, such as task_members, task_repos and worktrees, belong to a team through their task or workspace.
| Column | Type | Notes |
|---|---|---|
id |
uuid |
key |
name |
text |
unique |
created_at |
timestamptz |
default now() |
people
Section titled “people”A person on a team. On a server with native sign-in, such as gomoe.dev, login is the email of the person’s account. On a server in Tailscale mode it is the Tailscale login that tailscale serve passes on. forge_login is the person’s user name on the forge.
| Column | Type | Notes |
|---|---|---|
id |
uuid |
key |
team_id |
uuid |
references teams |
login |
text |
unique |
name |
text |
optional |
role |
text |
default 'member'; one of admin, member |
created_at |
timestamptz |
default now() |
forge_login |
text |
optional; unique |
invites
Section titled “invites”An invite to join a team, made in the app. With native sign-in, as on gomoe.dev, the server emails email a one-time link to /#/invite/<token>, valid 7 days, and keeps only the token’s SHA-256 in token_hash. The person joins through the link, or accepts the invite from the no-team page once their email is checked. In Tailscale mode the person joins when they first open the app with a Tailscale login equal to email, and Tailscale returns the invite link when asked, except for an email in the tailnet’s own domain, whose invite has no link. tailscale_invite_id is set only in Tailscale mode.
| Column | Type | Notes |
|---|---|---|
id |
uuid |
key |
team_id |
uuid |
references teams |
email |
text |
|
role |
text |
default 'member'; one of admin, member |
tailscale_invite_id |
text |
optional |
invited_by |
uuid |
optional; references people |
status |
text |
default 'open'; one of open, joined, cancelled, declined |
person_id |
uuid |
optional; references people |
created_at |
timestamptz |
default now() |
closed_at |
timestamptz |
optional |
token_hash |
text |
optional; unique |
expires_at |
timestamptz |
optional |
Unique (team_id, email) where (status = 'open'). Check ((email = lower(email)) AND (email ~~ '%_@_%')). Check ((status = 'joined') OR (person_id IS NULL)). Check ((status = 'open') = (closed_at IS NULL)). Check ((token_hash IS NULL) = (expires_at IS NULL)).
join_requests
Section titled “join_requests”A login that opened the app while on no team and with no invite. Admins see it and add the person. It has no team, since the login is on none.
| Column | Type | Notes |
|---|---|---|
id |
uuid |
key |
login |
text |
unique |
name |
text |
optional |
status |
text |
default 'waiting'; one of waiting, added |
person_id |
uuid |
optional; references people |
added_by |
uuid |
optional; references people |
first_seen_at |
timestamptz |
default now() |
last_seen_at |
timestamptz |
default now() |
Check ((status = 'added') OR ((person_id IS NULL) AND (added_by IS NULL))).
projects
Section titled “projects”A team’s work on one thing, with its repos, its room, and the tasks, runs, documents and rooms made in it. Everyone on the team sees every project.
| Column | Type | Notes |
|---|---|---|
id |
uuid |
key |
team_id |
uuid |
references teams |
name |
text |
|
description |
text |
default '' |
conversation_id |
uuid |
optional; references conversations |
created_by |
uuid |
optional; references people |
archived_at |
timestamptz |
optional |
created_at |
timestamptz |
default now() |
Unique (team_id, lower(name)) where (archived_at IS NULL). Check ((length(TRIM(BOTH FROM name)) >= 1) AND (length(TRIM(BOTH FROM name)) <= 80)).
repo_requests
Section titled “repo_requests”A request for the app to make a repo on GitHub for a project. It is written before GitHub is asked, so each try looks the repo up first and adopts one an earlier try made.
| Column | Type | Notes |
|---|---|---|
id |
uuid |
key |
team_id |
uuid |
references teams |
project_id |
uuid |
references projects |
owner |
text |
|
name |
text |
|
description |
text |
default '' |
status |
text |
default 'creating'; one of creating, done, failed |
error |
text |
optional |
repo_id |
uuid |
optional; references repos |
requested_by |
uuid |
optional; references people |
created_at |
timestamptz |
default now() |
updated_at |
timestamptz |
default now() |
Unique (team_id, lower(owner), lower(name)). Check ((status = 'done') OR (repo_id IS NULL)). Check ((status = 'failed') = (error IS NOT NULL)). Check (name ~ '^[A-Za-z0-9._-]{1,100}$').
A repo of a team, on the forge or on GitHub. policy_id and owner_id are set once the repo is under the coding framework.
| Column | Type | Notes |
|---|---|---|
id |
uuid |
key |
team_id |
uuid |
references teams |
remote_url |
text |
|
default_branch |
text |
default 'main' |
setup_command |
text |
optional |
created_at |
timestamptz |
default now() |
forge |
text |
default 'gitea'; one of gitea, github |
project_id |
uuid |
optional; references projects |
polled_at |
timestamptz |
optional |
policy_id |
uuid |
optional; references policies |
owner_id |
uuid |
optional; references people |
Unique (team_id, remote_url). Check ((policy_id IS NULL) OR (owner_id IS NOT NULL)).