-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.sql
35 lines (31 loc) · 807 Bytes
/
init.sql
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
CREATE EXTENSION IF NOT EXISTS vector;
CREATE TABLE IF NOT EXISTS embeddings_nomic_text (
tenant_id UUID ,
id UUID DEFAULT gen_random_uuid (),
file_id UUID,
embedding vector(768) NOT NULL,
primary key (tenant_id, id)
);
CREATE TABLE IF NOT EXISTS embeddings_mxbai_text (
tenant_id UUID ,
id UUID DEFAULT gen_random_uuid (),
file_id UUID,
embedding vector(1024) NOT NULL,
primary key (tenant_id, id)
);
CREATE TABLE IF NOT EXISTS file_content (
tenant_id UUID ,
project_id UUID,
id UUID DEFAULT gen_random_uuid (),
file_name VARCHAR(255) NOT NULL,
contents TEXT NOT NULL,
primary key (tenant_id, project_id, id)
);
CREATE TABLE IF NOT EXISTS projects (
tenant_id UUID,
id UUID DEFAULT gen_random_uuid (),
name varchar(30),
url varchar(1024),
description TEXT,
primary key (tenant_id, id)
);