mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-08-01 08:32:18 +00:00
test_migration_never_delegates_to_current_schema_helpers never actually ran the migration (missing check_and_run_migrations() call) and its source-text assertion was tautological (the "or DROP TABLE in source" clause was always true). Now runs the real migration and asserts spy call counts instead: DocumentChunksTable.create/DocumentMetaTable.create are each called exactly 3 times (construction, rebuild temp file, post-swap reopen -- all via _open_connection, never from inside apply()), and _create_vec_table is never called from the migration path. test_drop_table_clears_modified_times asserted via get_modified_times(), which short-circuits on table_exists() -- checking only the vec0 table that drop_table() drops first -- so the assertion held even if DocumentMetaTable.delete_all() were never called. Now asserts directly against document_meta and document_chunks row counts.