-- Drop invoice management tables
-- Migration: 20250110000002_create_invoice_tables

DROP TRIGGER IF EXISTS update_invoice_payments_updated_at ON invoice_payments;
DROP TRIGGER IF EXISTS update_invoice_items_updated_at ON invoice_items;
DROP TRIGGER IF EXISTS update_invoices_updated_at ON invoices;
DROP TRIGGER IF EXISTS update_invoice_templates_updated_at ON invoice_templates;
DROP TRIGGER IF EXISTS update_invoice_sequences_updated_at ON invoice_sequences;
DROP TRIGGER IF EXISTS update_invoice_customers_updated_at ON invoice_customers;
DROP TRIGGER IF EXISTS update_invoice_settings_updated_at ON invoice_settings;

DROP FUNCTION IF EXISTS update_updated_at_column();

DROP TABLE IF EXISTS invoice_payments;
DROP TABLE IF EXISTS invoice_items;
DROP TABLE IF EXISTS invoices;
DROP TABLE IF EXISTS invoice_templates;
DROP TABLE IF EXISTS invoice_sequences;
DROP TABLE IF EXISTS invoice_customers;
DROP TABLE IF EXISTS invoice_settings;
