Updated the Jenkinsfile to include a new credential for the development server user, enhancing the flexibility of user management during deployment. The SSH user variable now defaults to this new credential if available, improving security and maintainability.
Updated the Jenkinsfile to include commands for creating necessary database schemas (core, a24, a76, and public) during the setup process, ensuring the database is properly initialized for testing.
Updated the test configuration file to include imports for Trailer, Transporter, and Vehicle models from the transportation module, enhancing the testing capabilities for related functionalities.
- Updated the `validate_common` function to accept an optional `existing_invoice` parameter, allowing for more robust validation when updating invoices.
- Introduced a new helper function, `_normalize_invoice_currency_value`, to standardize currency code handling.
- Adjusted currency validation logic to ensure proper handling of existing invoice data, preventing changes to currency types when associated line items exist.
- Modified the `validate_update` functions in both imports and exports to pass the `existing_invoice` parameter, ensuring consistent validation across different update scenarios.
- 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.
- 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.
- Modified the error message in the build workflow to clarify the expected format for the TEST_DATABASE_URL, specifying the use of a real IP address instead of the placeholder "host".
- This change enhances the guidance provided to users, ensuring correct configuration for database connections in testing scenarios.
- Added a new function to reject documentation placeholder hosts in database URLs, improving error handling for misconfigurations.
- Updated the `get_database_url` function to incorporate this new validation, ensuring that users are alerted when using "host" as a placeholder.
- Enhanced error messages to provide clearer guidance on valid host configurations.
These changes aim to improve the robustness and clarity of database connection handling in the application.