-- +goose Up -- Remote download workers. A worker authenticates with a bearer token of -- which only the SHA-256 hash is stored. Tokens are per worker and can be -- revoked without touching the others. CREATE TABLE workers ( id TEXT PRIMARY KEY, token_hash TEXT NOT NULL UNIQUE, tags TEXT NOT NULL DEFAULT '', capacity INTEGER NOT NULL DEFAULT 0, draining BOOLEAN NOT NULL DEFAULT FALSE, revoked BOOLEAN NOT NULL DEFAULT FALSE, version TEXT NOT NULL DEFAULT '', last_seen_at BIGINT NOT NULL DEFAULT 0, created_at BIGINT NOT NULL ); -- +goose Down DROP TABLE workers;