Skip to content
42 linesCodeBlameRaw

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

Keep g1t's own runs off the model proxy until it holds g1t's key1CREATE TABLE users (
2 id INTEGER PRIMARY KEY,
3 username TEXT NOT NULL UNIQUE,
4 email TEXT,
5 password_hash TEXT NOT NULL,
6 created_at INTEGER NOT NULL DEFAULT (unixepoch())
7);
8
9-- id is the SHA-256 of the session cookie value.
10CREATE TABLE sessions (
11 id TEXT PRIMARY KEY,
12 user_id INTEGER NOT NULL REFERENCES users (id) ON DELETE CASCADE,
13 expires_at INTEGER NOT NULL
14);
15
16CREATE TABLE access_tokens (
17 id INTEGER PRIMARY KEY,
18 user_id INTEGER NOT NULL REFERENCES users (id) ON DELETE CASCADE,
19 name TEXT NOT NULL,
20 token_hash TEXT NOT NULL UNIQUE,
21 created_at INTEGER NOT NULL DEFAULT (unixepoch())
22);
23
24CREATE TABLE ssh_keys (
25 id INTEGER PRIMARY KEY,
26 user_id INTEGER NOT NULL REFERENCES users (id) ON DELETE CASCADE,
27 title TEXT NOT NULL,
28 public_key TEXT NOT NULL,
29 fingerprint TEXT NOT NULL UNIQUE,
30 created_at INTEGER NOT NULL DEFAULT (unixepoch())
31);
32
33-- Stored in Artifacts as "<owner username>--<name>".
34CREATE TABLE repos (
35 id INTEGER PRIMARY KEY,
36 owner_id INTEGER NOT NULL REFERENCES users (id) ON DELETE CASCADE,
37 name TEXT NOT NULL,
38 description TEXT,
39 is_private INTEGER NOT NULL DEFAULT 0,
40 created_at INTEGER NOT NULL DEFAULT (unixepoch()),
41 UNIQUE (owner_id, name)
42);

This file's history is long; its oldest lines are credited to the oldest commit read.