-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathLangchain.sql
More file actions
503 lines (339 loc) · 11.6 KB
/
Copy pathLangchain.sql
File metadata and controls
503 lines (339 loc) · 11.6 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
--
-- PostgreSQL database dump
--
\restrict pAigZvDXVneOdDmNlATF2lVbynDu0lI1IaWOUaSRSg1vb120Hv7JXQT7THrj7LD
-- Dumped from database version 18.0 (Debian 18.0-1.pgdg13+3)
-- Dumped by pg_dump version 18.0 (Debian 18.0-1.pgdg13+3)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET transaction_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
--
-- Name: vector; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS vector WITH SCHEMA public;
--
-- Name: EXTENSION vector; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION vector IS 'vector data type and ivfflat and hnsw access methods';
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- Name: alembic_version; Type: TABLE; Schema: public; Owner: guest
--
CREATE TABLE public.alembic_version (
version_num character varying(32) NOT NULL
);
ALTER TABLE public.alembic_version OWNER TO guest;
--
-- Name: checkpoint_blobs; Type: TABLE; Schema: public; Owner: guest
--
CREATE TABLE public.checkpoint_blobs (
thread_id text NOT NULL,
checkpoint_ns text DEFAULT ''::text NOT NULL,
channel text NOT NULL,
version text NOT NULL,
type text NOT NULL,
blob bytea
);
ALTER TABLE public.checkpoint_blobs OWNER TO guest;
--
-- Name: checkpoint_migrations; Type: TABLE; Schema: public; Owner: guest
--
CREATE TABLE public.checkpoint_migrations (
v integer NOT NULL
);
ALTER TABLE public.checkpoint_migrations OWNER TO guest;
--
-- Name: checkpoint_writes; Type: TABLE; Schema: public; Owner: guest
--
CREATE TABLE public.checkpoint_writes (
thread_id text NOT NULL,
checkpoint_ns text DEFAULT ''::text NOT NULL,
checkpoint_id text NOT NULL,
task_id text NOT NULL,
idx integer NOT NULL,
channel text NOT NULL,
type text,
blob bytea NOT NULL,
task_path text DEFAULT ''::text NOT NULL
);
ALTER TABLE public.checkpoint_writes OWNER TO guest;
--
-- Name: checkpoints; Type: TABLE; Schema: public; Owner: guest
--
CREATE TABLE public.checkpoints (
thread_id text NOT NULL,
checkpoint_ns text DEFAULT ''::text NOT NULL,
checkpoint_id text NOT NULL,
parent_checkpoint_id text,
type text,
checkpoint jsonb NOT NULL,
metadata jsonb DEFAULT '{}'::jsonb NOT NULL
);
ALTER TABLE public.checkpoints OWNER TO guest;
--
-- Name: ragagent_vectorstore; Type: TABLE; Schema: public; Owner: guest
--
CREATE TABLE public.ragagent_vectorstore (
langchain_id uuid NOT NULL,
content text NOT NULL,
embedding public.vector(768) NOT NULL,
langchain_metadata json
);
ALTER TABLE public.ragagent_vectorstore OWNER TO guest;
--
-- Name: store; Type: TABLE; Schema: public; Owner: guest
--
CREATE TABLE public.store (
prefix text NOT NULL,
key text NOT NULL,
value jsonb NOT NULL,
created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
expires_at timestamp with time zone,
ttl_minutes integer
);
ALTER TABLE public.store OWNER TO guest;
--
-- Name: store_migrations; Type: TABLE; Schema: public; Owner: guest
--
CREATE TABLE public.store_migrations (
v integer NOT NULL
);
ALTER TABLE public.store_migrations OWNER TO guest;
--
-- Name: store_vectors; Type: TABLE; Schema: public; Owner: guest
--
CREATE TABLE public.store_vectors (
prefix text NOT NULL,
key text NOT NULL,
field_name text NOT NULL,
embedding public.vector(768),
created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP
);
ALTER TABLE public.store_vectors OWNER TO guest;
--
-- Name: users; Type: TABLE; Schema: public; Owner: guest
--
CREATE TABLE public.users (
id integer NOT NULL,
firstname character varying(128) NOT NULL,
lastname character varying(128) NOT NULL,
email character varying(255) NOT NULL,
phone character varying(15),
password character varying(128),
lastlogin timestamp with time zone,
created_at timestamp with time zone DEFAULT now() NOT NULL,
modified_at timestamp with time zone DEFAULT now() NOT NULL
);
ALTER TABLE public.users OWNER TO guest;
--
-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: guest
--
CREATE SEQUENCE public.users_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE public.users_id_seq OWNER TO guest;
--
-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: guest
--
ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
--
-- Name: vector_migrations; Type: TABLE; Schema: public; Owner: guest
--
CREATE TABLE public.vector_migrations (
v integer NOT NULL
);
ALTER TABLE public.vector_migrations OWNER TO guest;
--
-- Name: users id; Type: DEFAULT; Schema: public; Owner: guest
--
ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);
--
-- Data for Name: alembic_version; Type: TABLE DATA; Schema: public; Owner: guest
--
COPY public.alembic_version (version_num) FROM stdin;
12c3cd5b0d47
\.
--
-- Data for Name: checkpoint_blobs; Type: TABLE DATA; Schema: public; Owner: guest
--
COPY public.checkpoint_blobs (thread_id, checkpoint_ns, channel, version, type, blob) FROM stdin;
\.
--
-- Data for Name: checkpoint_migrations; Type: TABLE DATA; Schema: public; Owner: guest
--
COPY public.checkpoint_migrations (v) FROM stdin;
0
1
2
3
4
5
6
7
8
9
\.
--
-- Data for Name: checkpoint_writes; Type: TABLE DATA; Schema: public; Owner: guest
--
COPY public.checkpoint_writes (thread_id, checkpoint_ns, checkpoint_id, task_id, idx, channel, type, blob, task_path) FROM stdin;
\.
--
-- Data for Name: checkpoints; Type: TABLE DATA; Schema: public; Owner: guest
--
COPY public.checkpoints (thread_id, checkpoint_ns, checkpoint_id, parent_checkpoint_id, type, checkpoint, metadata) FROM stdin;
\.
--
-- Data for Name: ragagent_vectorstore; Type: TABLE DATA; Schema: public; Owner: guest
--
COPY public.ragagent_vectorstore (langchain_id, content, embedding, langchain_metadata) FROM stdin;
\.
--
-- Data for Name: store; Type: TABLE DATA; Schema: public; Owner: guest
--
COPY public.store (prefix, key, value, created_at, updated_at, expires_at, ttl_minutes) FROM stdin;
\.
--
-- Data for Name: store_migrations; Type: TABLE DATA; Schema: public; Owner: guest
--
COPY public.store_migrations (v) FROM stdin;
0
1
2
3
\.
--
-- Data for Name: store_vectors; Type: TABLE DATA; Schema: public; Owner: guest
--
COPY public.store_vectors (prefix, key, field_name, embedding, created_at, updated_at) FROM stdin;
\.
--
-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: guest
--
COPY public.users (id, firstname, lastname, email, phone, password, lastlogin, created_at, modified_at) FROM stdin;
1 Kok How Teh khteh@email.com \N $2b$10$fBHPNGkND06ksrmTULGAoewTRPuezEuJwrV9JFLQvDMGa.BC0fgQi \N 2026-04-29 11:24:30.320056+00 2026-04-29 11:24:30.320056+00
2 Mickey Mouse mickey@email.com \N $2b$10$zZ/95mFOS7.wMBfxPsbCYu3JQ3Y7X62thZToU0XX73IeOk0XXej9y \N 2026-04-29 11:24:50.272816+00 2026-04-29 11:24:50.272816+00
\.
--
-- Data for Name: vector_migrations; Type: TABLE DATA; Schema: public; Owner: guest
--
COPY public.vector_migrations (v) FROM stdin;
0
1
2
\.
--
-- Name: users_id_seq; Type: SEQUENCE SET; Schema: public; Owner: guest
--
SELECT pg_catalog.setval('public.users_id_seq', 2, true);
--
-- Name: alembic_version alembic_version_pkc; Type: CONSTRAINT; Schema: public; Owner: guest
--
ALTER TABLE ONLY public.alembic_version
ADD CONSTRAINT alembic_version_pkc PRIMARY KEY (version_num);
--
-- Name: checkpoint_blobs checkpoint_blobs_pkey; Type: CONSTRAINT; Schema: public; Owner: guest
--
ALTER TABLE ONLY public.checkpoint_blobs
ADD CONSTRAINT checkpoint_blobs_pkey PRIMARY KEY (thread_id, checkpoint_ns, channel, version);
--
-- Name: checkpoint_migrations checkpoint_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: guest
--
ALTER TABLE ONLY public.checkpoint_migrations
ADD CONSTRAINT checkpoint_migrations_pkey PRIMARY KEY (v);
--
-- Name: checkpoint_writes checkpoint_writes_pkey; Type: CONSTRAINT; Schema: public; Owner: guest
--
ALTER TABLE ONLY public.checkpoint_writes
ADD CONSTRAINT checkpoint_writes_pkey PRIMARY KEY (thread_id, checkpoint_ns, checkpoint_id, task_id, idx);
--
-- Name: checkpoints checkpoints_pkey; Type: CONSTRAINT; Schema: public; Owner: guest
--
ALTER TABLE ONLY public.checkpoints
ADD CONSTRAINT checkpoints_pkey PRIMARY KEY (thread_id, checkpoint_ns, checkpoint_id);
--
-- Name: ragagent_vectorstore ragagent_vectorstore_pkey; Type: CONSTRAINT; Schema: public; Owner: guest
--
ALTER TABLE ONLY public.ragagent_vectorstore
ADD CONSTRAINT ragagent_vectorstore_pkey PRIMARY KEY (langchain_id);
--
-- Name: store_migrations store_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: guest
--
ALTER TABLE ONLY public.store_migrations
ADD CONSTRAINT store_migrations_pkey PRIMARY KEY (v);
--
-- Name: store store_pkey; Type: CONSTRAINT; Schema: public; Owner: guest
--
ALTER TABLE ONLY public.store
ADD CONSTRAINT store_pkey PRIMARY KEY (prefix, key);
--
-- Name: store_vectors store_vectors_pkey; Type: CONSTRAINT; Schema: public; Owner: guest
--
ALTER TABLE ONLY public.store_vectors
ADD CONSTRAINT store_vectors_pkey PRIMARY KEY (prefix, key, field_name);
--
-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: guest
--
ALTER TABLE ONLY public.users
ADD CONSTRAINT users_pkey PRIMARY KEY (id);
--
-- Name: vector_migrations vector_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: guest
--
ALTER TABLE ONLY public.vector_migrations
ADD CONSTRAINT vector_migrations_pkey PRIMARY KEY (v);
--
-- Name: checkpoint_blobs_thread_id_idx; Type: INDEX; Schema: public; Owner: guest
--
CREATE INDEX checkpoint_blobs_thread_id_idx ON public.checkpoint_blobs USING btree (thread_id);
--
-- Name: checkpoint_writes_thread_id_idx; Type: INDEX; Schema: public; Owner: guest
--
CREATE INDEX checkpoint_writes_thread_id_idx ON public.checkpoint_writes USING btree (thread_id);
--
-- Name: checkpoints_thread_id_idx; Type: INDEX; Schema: public; Owner: guest
--
CREATE INDEX checkpoints_thread_id_idx ON public.checkpoints USING btree (thread_id);
--
-- Name: idx_store_expires_at; Type: INDEX; Schema: public; Owner: guest
--
CREATE INDEX idx_store_expires_at ON public.store USING btree (expires_at) WHERE (expires_at IS NOT NULL);
--
-- Name: ix_users_email; Type: INDEX; Schema: public; Owner: guest
--
CREATE UNIQUE INDEX ix_users_email ON public.users USING btree (email);
--
-- Name: ix_users_phone; Type: INDEX; Schema: public; Owner: guest
--
CREATE UNIQUE INDEX ix_users_phone ON public.users USING btree (phone);
--
-- Name: store_prefix_idx; Type: INDEX; Schema: public; Owner: guest
--
CREATE INDEX store_prefix_idx ON public.store USING btree (prefix text_pattern_ops);
--
-- Name: store_vectors_embedding_idx; Type: INDEX; Schema: public; Owner: guest
--
CREATE INDEX store_vectors_embedding_idx ON public.store_vectors USING hnsw (embedding public.vector_cosine_ops);
--
-- Name: store_vectors store_vectors_prefix_key_fkey; Type: FK CONSTRAINT; Schema: public; Owner: guest
--
ALTER TABLE ONLY public.store_vectors
ADD CONSTRAINT store_vectors_prefix_key_fkey FOREIGN KEY (prefix, key) REFERENCES public.store(prefix, key) ON DELETE CASCADE;
--
-- PostgreSQL database dump complete
--
\unrestrict pAigZvDXVneOdDmNlATF2lVbynDu0lI1IaWOUaSRSg1vb120Hv7JXQT7THrj7LD