Commit Graph

4 Commits

Author SHA1 Message Date
28de77e50b Refactor Alembic migration for index management and column type update
- Simplified the index drop and creation logic in the `upgrade` and `downgrade` functions by removing the unnecessary existence check for the `carta_porte_codes` table.
- Updated the `iva_factor` column type in the `invoice_financials` table from VARCHAR to Numeric, enhancing data integrity.
- Improved the overall clarity and efficiency of the migration script.
2026-03-24 18:05:24 -05:00
06b3b20fd8 Refactor test setup to utilize ephemeral tenant IDs
- Introduced a new fixture, `test_tenant`, to allocate ephemeral tenant and company IDs for tests, reducing conflicts with real data.
- Updated various test functions to use the new `test_tenant` fixture, ensuring consistent tenant ID usage across tests.
- Enhanced the `ensure_tenant_company` function to accept dynamic tenant and company IDs, improving flexibility in test scenarios.
- Adjusted database interaction in tests to utilize the ephemeral IDs, streamlining the setup process and enhancing isolation.
2026-03-24 17:24:01 -05:00
c812f5214c Add address handling for ClientProvider in business catalog creation
- Introduced a new helper function `_ensure_client_provider_address` to manage the assignment of addresses for ClientProvider instances.
- Refactored the `create_business_catalogs` function to utilize the new helper, ensuring that existing addresses are reused if available, preventing duplicate entries.
- This change enhances the integrity of address data during business catalog creation by ensuring proper address assignment based on existing records.
2026-03-24 12:42:19 -05:00
b750c35522 Add backend test job to CI workflow
- Introduced a new job in the CI workflow to run backend tests before the build process.
- Configured Python environment and installed dependencies from the backend requirements.
- Added a check for the TEST_DATABASE_URL secret to ensure it is defined before running tests.
- The test job must pass for the build job to execute, enhancing the reliability of the CI pipeline.
2026-03-24 12:33:21 -05:00