- Implement tests for the internet connections module, covering routes, IP range creation, and connection validation. - Add tests for the Invoice2DataService to validate extraction from GlobalConnect invoices. - Create tests for subscription network provisioning, ensuring proper handling of network items and IP allocations. - Include validation checks for subtotal mismatches and ensure error handling for missing IP selections.
16 lines
465 B
SQL
16 lines
465 B
SQL
WITH bmc_owner AS (
|
|
SELECT MIN(id) AS id
|
|
FROM customers
|
|
WHERE lower(name) = 'bmc networks'
|
|
AND is_active = true
|
|
)
|
|
UPDATE internet_connections_connections ic
|
|
SET customer_id = COALESCE((SELECT id FROM bmc_owner), ic.customer_id),
|
|
allocation_model = 'shared',
|
|
value_type = 'bmc_networks',
|
|
value_label = NULL,
|
|
updated_at = CURRENT_TIMESTAMP
|
|
WHERE ic.deleted_at IS NULL
|
|
AND ic.parent_id IS NULL
|
|
AND ic.value_type = 'bmc_networks';
|