Deploy on 2026-06-05 02:30:43
This commit is contained in:
11
database/migrations/008_create_interactions_table.sql
Normal file
11
database/migrations/008_create_interactions_table.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
CREATE TABLE interactions (
|
||||
id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
|
||||
contact_id BIGINT UNSIGNED NOT NULL,
|
||||
type VARCHAR(50) NOT NULL DEFAULT 'note',
|
||||
notes TEXT NULL,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (contact_id) REFERENCES contacts(id) ON DELETE CASCADE,
|
||||
INDEX idx_interactions_contact (contact_id),
|
||||
INDEX idx_interactions_type (type)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
Reference in New Issue
Block a user