0c422fcd25
- Consolidate migration numbering (move full_bas_2026 to slot 044) - Remove dead/superseded migrations (document_matching, reversal columns) - Update CLAUDE.md with placeholder migration notes and corrected descriptions - Fix migration SQL for invoice_inbox, extension_data, supplier_invoices Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
19 lines
739 B
SQL
19 lines
739 B
SQL
-- Migration 034: Fix extension_data updated_at trigger
|
|
-- Originally fixed a wrong function reference (update_updated_at vs update_updated_at_column).
|
|
-- The issue is now fixed directly in migration 020, making this a no-op for fresh deployments.
|
|
-- Kept for migration numbering sequence. Safe to re-run: just drops a trigger that may not exist.
|
|
|
|
DO $$
|
|
BEGIN
|
|
-- Drop the incorrectly-named trigger if it exists from an older migration version
|
|
IF EXISTS (
|
|
SELECT 1 FROM information_schema.triggers
|
|
WHERE trigger_schema = 'public'
|
|
AND event_object_table = 'extension_data'
|
|
AND trigger_name = 'extension_data_updated_at'
|
|
) THEN
|
|
DROP TRIGGER extension_data_updated_at ON public.extension_data;
|
|
END IF;
|
|
END;
|
|
$$;
|