🚀 مُصادَق: تحديث برمجي جديد 2026-05-03 16:43
This commit is contained in:
12
database/migrations/005_notifications.sql
Normal file
12
database/migrations/005_notifications.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
CREATE TABLE IF NOT EXISTS notifications (
|
||||
id CHAR(36) NOT NULL DEFAULT (UUID()),
|
||||
user_id CHAR(36) NOT NULL,
|
||||
title VARCHAR(255) NOT NULL,
|
||||
message TEXT NOT NULL,
|
||||
type ENUM('info','success','warning','error') NOT NULL DEFAULT 'info',
|
||||
is_read TINYINT(1) NOT NULL DEFAULT 0,
|
||||
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (id),
|
||||
INDEX idx_notif_user (user_id),
|
||||
CONSTRAINT fk_notif_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
Reference in New Issue
Block a user