bmc_hub/migrations/1044_time_entry_audit_event.sql

12 lines
574 B
MySQL
Raw Permalink Normal View History

-- Add time-entry edits to the existing audit stream without changing older rows.
ALTER TABLE tmodule_sync_log DROP CONSTRAINT IF EXISTS check_event_type;
ALTER TABLE tmodule_sync_log ADD CONSTRAINT check_event_type CHECK (event_type IN (
'sync_started', 'sync_completed', 'sync_failed',
'approval', 'rejection', 'bulk_approval',
'order_created', 'order_updated', 'order_cancelled',
'export_started', 'export_completed', 'export_failed',
'module_installed', 'module_uninstalled',
'hourly_rate_updated', 'time_card_toggled', 'time_entry_updated'
));