Implementation of Notification System
This commit is contained in:
13
docs/migrations/006b_create_notifications_table.sql
Normal file
13
docs/migrations/006b_create_notifications_table.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
-- Migration: create notifications table (corrected: `read_by` nullable)
|
||||
CREATE TABLE IF NOT EXISTS `notifications` (
|
||||
`id` BIGINT PRIMARY KEY AUTO_INCREMENT,
|
||||
`user_id` INT DEFAULT NULL,
|
||||
`event` VARCHAR(100) NOT NULL,
|
||||
`sub_feed` VARCHAR(100) DEFAULT NULL,
|
||||
`data` TEXT DEFAULT NULL,
|
||||
`target_url` VARCHAR(1024) DEFAULT NULL,
|
||||
`read_by` TEXT DEFAULT NULL,
|
||||
`time_created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
INDEX (`user_id`),
|
||||
INDEX (`sub_feed`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
Reference in New Issue
Block a user