bmc_hub/migrations/168_subscription_scheduler_and_asset_overlap_indexes.sql
Christian ceb560e2f2 feat: Add bottom bar functionality with real-time updates and manual endpoint tests
- Implemented a new bottom bar feature in `bottom-bar.js` that fetches and displays various notifications and statuses in real-time.
- Added functions for handling visibility, state updates, and user interactions within the bottom bar.
- Introduced WebSocket connection for real-time updates and fallback polling mechanism.
- Created a manual testing script `test_manual.py` to validate API endpoints for the manual module.
- Included tests for various paths to ensure expected responses from the server.
2026-04-12 02:27:01 +02:00

14 lines
638 B
SQL

-- Migration 168: Subscription scheduler and asset overlap indexes
-- Improves performance for due-subscription scans and asset overlap validation.
CREATE INDEX IF NOT EXISTS idx_sag_subscriptions_status_next_invoice_date
ON sag_subscriptions(status, next_invoice_date);
CREATE INDEX IF NOT EXISTS idx_sag_subscription_items_asset_period
ON sag_subscription_items(asset_id, period_from, period_to)
WHERE asset_id IS NOT NULL;
CREATE INDEX IF NOT EXISTS idx_subscription_asset_bindings_asset_dates_active
ON subscription_asset_bindings(asset_id, start_date, end_date)
WHERE deleted_at IS NULL AND status = 'active';