Merged in feature/restore-migrations-v2 (pull request #205)

Restore original migrations (001-120) to fix schema_migrations version mismatch

* Restore original migrations (001-120) to fix schema_migrations version mismatch

The previous migration collapse broke deployed databases because:
- Dev database was at version 120 (the real remove_text_extraction migration)
- Main had collapsed migrations (001-012) + stub files (119_stub, 120_stub)
- The migrate tool couldn't find version 119/120 with matching content

This commit restores the original 27 migrations (versions 001-120) from
before the collapse, ensuring backward compatibility with existing databases.
This commit is contained in:
Jay Brown
2026-01-15 23:18:53 +00:00
parent 3639af8b84
commit c10fa98d0a
69 changed files with 1271 additions and 506 deletions
@@ -0,0 +1,13 @@
-- Drop indexes
DROP INDEX IF EXISTS idx_documents_batch_id;
DROP INDEX IF EXISTS idx_batch_uploads_status;
DROP INDEX IF EXISTS idx_batch_uploads_client_id;
-- Remove batch_id from documents table
ALTER TABLE documents DROP COLUMN IF EXISTS batch_id;
-- Drop batch uploads table
DROP TABLE IF EXISTS batch_uploads;
-- Drop batch status ENUM type
DROP TYPE IF EXISTS batch_status;