mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-24 06:09:33 +00:00
39 lines
965 B
SQL
39 lines
965 B
SQL
CREATE TABLE IF NOT EXISTS schema_meta (
|
|
meta_key TEXT NOT NULL PRIMARY KEY,
|
|
role TEXT NOT NULL,
|
|
schema_version INTEGER NOT NULL,
|
|
agent_id TEXT,
|
|
app_version TEXT,
|
|
created_at INTEGER NOT NULL,
|
|
updated_at INTEGER NOT NULL
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS cache_entries (
|
|
scope TEXT NOT NULL,
|
|
key TEXT NOT NULL,
|
|
value_json TEXT,
|
|
blob BLOB,
|
|
expires_at INTEGER,
|
|
updated_at INTEGER NOT NULL,
|
|
PRIMARY KEY (scope, key)
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_agent_cache_expiry
|
|
ON cache_entries(scope, expires_at, key)
|
|
WHERE expires_at IS NOT NULL;
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_agent_cache_updated
|
|
ON cache_entries(scope, updated_at DESC, key);
|
|
|
|
CREATE TABLE IF NOT EXISTS auth_profile_store (
|
|
store_key TEXT NOT NULL PRIMARY KEY,
|
|
store_json TEXT NOT NULL,
|
|
updated_at INTEGER NOT NULL
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS auth_profile_state (
|
|
state_key TEXT NOT NULL PRIMARY KEY,
|
|
state_json TEXT NOT NULL,
|
|
updated_at INTEGER NOT NULL
|
|
);
|