- Introduced Technician Dashboard V1 (tech_v1_overview.html) with KPI cards and new cases overview. - Implemented Technician Dashboard V2 (tech_v2_workboard.html) featuring a workboard layout for daily tasks and opportunities. - Developed Technician Dashboard V3 (tech_v3_table_focus.html) with a power table for detailed case management. - Created a dashboard selector page (technician_dashboard_selector.html) for easy navigation between dashboard versions. - Added user dashboard preferences migration (130_user_dashboard_preferences.sql) to store default dashboard paths. - Enhanced sag_sager table with assigned group ID (131_sag_assignment_group.sql) for better case management. - Updated sag_subscriptions table to include cancellation rules and billing dates (132_subscription_cancellation.sql, 134_subscription_billing_dates.sql). - Implemented subscription staging for CRM integration (136_simply_subscription_staging.sql). - Added a script to move time tracking section in detail view (move_time_section.py). - Created a test script for subscription processing (test_subscription_processing.py).
18 lines
754 B
SQL
18 lines
754 B
SQL
-- Migration 135: Add daily and biweekly billing intervals
|
|
-- Extends subscription billing intervals to support more frequent billing
|
|
|
|
-- Drop the old constraint
|
|
ALTER TABLE sag_subscriptions
|
|
DROP CONSTRAINT IF EXISTS sag_subscriptions_billing_interval_check;
|
|
|
|
-- Add new constraint with extended options
|
|
ALTER TABLE sag_subscriptions
|
|
ADD CONSTRAINT sag_subscriptions_billing_interval_check
|
|
CHECK (billing_interval IN ('daily', 'biweekly', 'monthly', 'quarterly', 'yearly'));
|
|
|
|
-- Update default if needed (keep monthly as default)
|
|
ALTER TABLE sag_subscriptions
|
|
ALTER COLUMN billing_interval SET DEFAULT 'monthly';
|
|
|
|
COMMENT ON COLUMN sag_subscriptions.billing_interval IS 'Billing frequency: daily, biweekly (every 14 days), monthly, quarterly, yearly';
|