-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.sql
More file actions
57 lines (52 loc) · 1.61 KB
/
Copy pathschema.sql
File metadata and controls
57 lines (52 loc) · 1.61 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
-- 🧱 Database Schema (Supabase)
-- Users table (add is_admin column)
create table if not exists users (
id uuid primary key default gen_random_uuid(),
firebase_uid text unique not null,
email text,
is_admin boolean default false,
created_at timestamptz default now(),
updated_at timestamptz default now()
);
-- Projects table
create table if not exists projects (
id uuid primary key default gen_random_uuid(),
user_id uuid references users(id) on delete cascade,
name text not null,
description text,
task_type text not null,
framework text default 'pytorch',
dataset_source text default 'kaggle',
search_keywords text[],
status text default 'draft',
metadata jsonb default '{}'::jsonb,
created_at timestamptz default now(),
updated_at timestamptz default now()
);
create table if not exists datasets (
id uuid primary key default gen_random_uuid(),
project_id uuid references projects(id) on delete cascade,
name text,
gcs_url text,
size text,
source text default 'kaggle',
created_at timestamptz default now()
);
create table if not exists models (
id uuid primary key default gen_random_uuid(),
project_id uuid references projects(id) on delete cascade,
name text,
framework text default 'pytorch',
gcs_url text,
accuracy numeric,
metadata jsonb default '{}'::jsonb,
created_at timestamptz default now()
);
create table if not exists agent_logs (
id uuid primary key default gen_random_uuid(),
project_id uuid references projects(id) on delete cascade,
agent_name text,
message text,
log_level text default 'info',
created_at timestamptz default now()
);