Files
llmgw/internal/store/migrations/postgres/0046_user_excluded_licences.sql
T
Ilker ManapandClaude Opus 5.5 4bbac0833d A person leaves licences out, and no key of theirs reaches a model under one
A game sold in the EU cannot ship what a licence excluding the EU made. On
the profile page a person leaves out licences one by one, or by rule:
every licence forbidding commercial use, every licence granting nothing in
a region. The rules cover models added later. The choice reaches every
principal through the resolved limits, so permits() leaves such models out
of /v1/models, requests, jobs, fallbacks and the portal's pickers, and a
request for one is refused 403 licence_excluded saying which choice did.

Kept in user_excluded_licences (migration 0046), copied with the store and
gone with the person.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-11 16:10:22 +02:00

10 lines
435 B
SQL

-- Ported from the SQLite migration of the same number.
-- The licences a person has said not to use. Models under them are not
-- listed to the person, nor served to their keys or their sessions: a
-- game sold in the EU cannot ship what a licence excluding the EU made.
CREATE TABLE user_excluded_licences (
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
licence TEXT NOT NULL,
PRIMARY KEY (user_id, licence)
);