38960-vm/db/migrations/20260321_create_insurance_payments.sql
2026-03-21 14:06:06 +00:00

11 lines
418 B
SQL

CREATE TABLE IF NOT EXISTS insurance_payments (
id INT AUTO_INCREMENT PRIMARY KEY,
insurance_company_id INT NOT NULL,
amount DECIMAL(10, 2) NOT NULL,
payment_date DATE NOT NULL,
reference_number VARCHAR(100) DEFAULT NULL,
notes TEXT DEFAULT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (insurance_company_id) REFERENCES insurance_companies(id) ON DELETE CASCADE
);