Commit Graph

12 Commits

Author SHA1 Message Date
copilot-swe-agent[bot] b87dd6083c fix(database): skip create_all for Alembic-tracked databases to prevent OperationalError on webhook_configs
When init_db() called Base.metadata.create_all() before Alembic migrations,
the ORM model created the webhook_configs table. Alembic migration 009 then
failed with OperationalError: table webhook_configs already exists.

Fix: check for alembic_version table before calling create_all(). Tracked
databases skip create_all and let Alembic handle all schema changes instead.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-02 10:25:34 +00:00
copilot-swe-agent[bot] 8d81ed6c74 fix: address code review feedback - use specific exceptions, dynamic revision IDs in tests
- Replace bare Exception catches with sa.exc.OperationalError in migration 007
- Use ScriptDirectory.get_heads() for dynamic revision ID assertions in tests
- Make migration count assertion flexible (>= 8 instead of == 8)
- Rewrite pending migrations test to actually test upgrade from revision 006

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-01 16:57:19 +00:00
copilot-swe-agent[bot] 87d1b9d935 refactor(database): enforce Alembic-only database migrations, deprecate manual schema migrations
- Create alembic.ini and migrations/env.py for full Alembic CLI + programmatic support
- Add Alembic migration 006: detail column on processing_logs
- Add Alembic migration 007: ocr_quality_score column + drop unique filehash index
- Add Alembic migration 008: performance indexes
- Replace _run_schema_migrations() call in init_db() with _run_alembic_upgrade()
- Deprecate _run_schema_migrations() with DeprecationWarning
- Update tests for new Alembic-based approach and deprecation
- Update DatabaseConfiguration.md documentation

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-01 16:47:41 +00:00
copilot-swe-agent[bot] db581ba355 fix(database): add runtime migrations for ocr_text, ai_metadata, document_title columns
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-25 14:37:56 +00:00
copilot-swe-agent[bot] 1be3f1254b test: add comprehensive tests for license_routes, database migrations, SFTP, S3, and notifications
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-14 00:30:52 +00:00
github-actions[bot] e84c031538 style: apply ruff auto-fix
- Auto-formatted code with ruff format
- Applied ruff linting fixes with --fix

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-14 00:16:21 +00:00
copilot-swe-agent[bot] 6d9649609d test: address code review feedback
- Rename test for clarity (fallback_to_builtin_template_when_custom_template_fails)
- Add MIME type validation for SVG logo test
- Use precise assertion for logo location check count
- Add column type validation in migration test
- All 39 tests pass

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-13 23:15:28 +00:00
copilot-swe-agent[bot] fb73fe0935 test: add comprehensive tests for database.py and upload_to_email.py
- Added tests for database.py migration functions
- Added tests for error handling in init_db()
- Added tests for file path columns migration
- Added tests for unique index dropping
- Added tests for idempotent migrations
- Added tests for email template fallback logic
- Added tests for SVG logo attachment
- Added tests for SMTP without TLS and without auth
- Added tests for timeout errors in SMTP
- Added tests for upload_to_email task validation

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-13 23:10:04 +00:00
copilot-swe-agent[bot] 43bc58770d refactor: consolidate linting tools into Ruff
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-13 09:10:52 +00:00
copilot-swe-agent[bot] ff9a3ff49f style: fix code formatting with black, isort, and flake8
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-12 03:21:41 +00:00
copilot-swe-agent[bot] b18f5ee13c feat(ui): add verbose worker log detail to processing history on file detail page
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-11 09:06:30 +00:00
copilot-swe-agent[bot] c3bfb26c73 test: add comprehensive tests across modules to increase coverage above 60%
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-09 11:57:09 +00:00