c45e1dd427
all schema and rest apis for text extraction support * in progress * stage 8 complete * phase 9 completed * phase 9 complete * ongoing - s3 path fix * working * optimize ci build * e2e tests * missing test
19 lines
697 B
SQL
19 lines
697 B
SQL
-- Rollback: Remove folderId, originalPath columns and related constraints/indexes from documents table
|
|
|
|
-- Remove comments from folders table
|
|
COMMENT ON COLUMN folders.path IS NULL;
|
|
COMMENT ON TABLE folders IS NULL;
|
|
|
|
-- Remove comments from documentEntries table
|
|
COMMENT ON COLUMN documentEntries.bucket IS NULL;
|
|
COMMENT ON COLUMN documentEntries.key IS NULL;
|
|
|
|
-- Remove originalPath column
|
|
COMMENT ON COLUMN documents.originalPath IS NULL;
|
|
ALTER TABLE documents DROP COLUMN IF EXISTS originalPath;
|
|
|
|
-- Remove folderId column
|
|
DROP INDEX IF EXISTS idx_documents_folderid;
|
|
ALTER TABLE documents DROP CONSTRAINT IF EXISTS fk_documents_folderid;
|
|
ALTER TABLE documents DROP COLUMN IF EXISTS folderId;
|