-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsupabase_schema.sql
More file actions
39 lines (34 loc) · 1.18 KB
/
Copy pathsupabase_schema.sql
File metadata and controls
39 lines (34 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
-- DELTA Supabase schema
-- Run this once in your Supabase SQL editor (https://supabase.com/dashboard)
create table if not exists delta_soul (
agent_id text primary key,
identity text,
boot_count int default 0,
data jsonb,
updated_at timestamptz default now()
);
create table if not exists delta_goals (
id text not null,
agent_id text not null,
text text,
status text,
priority int default 0,
data jsonb,
created_at timestamptz,
updated_at timestamptz default now(),
primary key (agent_id, id)
);
create table if not exists delta_episodes (
id uuid default gen_random_uuid() primary key,
agent_id text not null,
ts timestamptz,
summary text,
data jsonb,
inserted_at timestamptz default now()
);
create index if not exists delta_episodes_ts on delta_episodes (agent_id, ts desc);
create index if not exists delta_goals_status on delta_goals (agent_id, status);
-- Enable RLS if you want per-user isolation (optional)
-- alter table delta_soul enable row level security;
-- alter table delta_goals enable row level security;
-- alter table delta_episodes enable row level security;