forked from 42-195KM/backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sql
More file actions
25 lines (21 loc) · 673 Bytes
/
init.sql
File metadata and controls
25 lines (21 loc) · 673 Bytes
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
CREATE DATABASE achievement;
CREATE DATABASE alert;
CREATE DATABASE chatbot;
CREATE DATABASE competition;
CREATE DATABASE crew;
CREATE DATABASE ranking;
CREATE DATABASE runningrecord;
CREATE DATABASE userrecap;
CREATE DATABASE users;
CREATE DATABASE auth;
\connect chatbot
CREATE EXTENSION IF NOT EXISTS vector;
CREATE EXTENSION IF NOT EXISTS hstore;
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE TABLE IF NOT EXISTS vector_store (
id uuid DEFAULT uuid_generate_v4() PRIMARY KEY,
content text,
metadata json,
embedding vector(768)
);
CREATE INDEX ON vector_store USING HNSW (embedding vector_cosine_ops);