Rename query publication flag

Refs #2735
This commit is contained in:
Simon Willison 2026-05-25 09:46:39 -07:00
commit e62a5ea337
8 changed files with 63 additions and 63 deletions

View file

@ -2158,13 +2158,13 @@ The internal database schema is as follows:
options TEXT NOT NULL DEFAULT '{}',
parameters TEXT NOT NULL DEFAULT '[]',
is_write INTEGER NOT NULL DEFAULT 0 CHECK (is_write IN (0, 1)),
published INTEGER NOT NULL DEFAULT 0 CHECK (published IN (0, 1)),
is_published INTEGER NOT NULL DEFAULT 0 CHECK (is_published IN (0, 1)),
source TEXT NOT NULL DEFAULT 'user',
owner_id TEXT,
created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (database_name, name),
CHECK (is_write = 0 OR published = 0)
CHECK (is_write = 0 OR is_published = 0)
);
CREATE INDEX queries_owner_idx
ON queries(owner_id);