add: better app data queries

This commit is contained in:
trisua 2025-07-18 00:14:52 -04:00
parent 9f61d9ce6a
commit 22aea48cc5
12 changed files with 175 additions and 60 deletions

View file

@ -1,6 +1,5 @@
CREATE TABLE IF NOT EXISTS app_data (
id BIGINT NOT NULL PRIMARY KEY,
owner BIGINT NOT NULL,
app BIGINT NOT NULL,
k TEXT NOT NULL,
v TEXT NOT NULL

View file

@ -8,5 +8,6 @@ CREATE TABLE IF NOT EXISTS apps (
quota_status TEXT NOT NULL,
banned INT NOT NULL,
grants INT NOT NULL,
scopes TEXT NOT NULL
scopes TEXT NOT NULL,
data_used INT NOT NULL CHECK (data_used >= 0)
)