agent build
This commit is contained in:
21
migrations/000008_knowledge.down.sql
Normal file
21
migrations/000008_knowledge.down.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
-- Reverses 000008.
|
||||
--
|
||||
-- Drops the two tables and the similarity function. Chunks go with their
|
||||
-- documents by CASCADE, and both tables' indexes go with them.
|
||||
--
|
||||
-- Rolling this back destroys the index, not the sources. Documents were
|
||||
-- ingested FROM somewhere — a policy store, an upload, a file — and this table
|
||||
-- is a derived copy, so the cost of reversing is a re-ingest and a re-embed
|
||||
-- rather than lost content. The re-embed is the expensive half, and it is worth
|
||||
-- saying out loud before anyone runs this in an environment where embedding
|
||||
-- costs money.
|
||||
--
|
||||
-- Order matters: the function is dropped last because nothing depends on it,
|
||||
-- and the tables are dropped before it only so that a partially-applied
|
||||
-- rollback leaves no table referencing a missing function.
|
||||
|
||||
SET search_path = public;
|
||||
|
||||
DROP TABLE IF EXISTS public.knowledge_chunks;
|
||||
DROP TABLE IF EXISTS public.knowledge_documents;
|
||||
DROP FUNCTION IF EXISTS public.knowledge_dot(real[], real[]);
|
||||
Reference in New Issue
Block a user