11 lines
418 B
SQL
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
|
|
);
|