asdlkif
This commit is contained in:
@@ -2,5 +2,10 @@ CREATE TABLE IF NOT EXISTS `huge`.`notes` (
|
||||
`note_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`note_text` text NOT NULL,
|
||||
`user_id` int(11) unsigned NOT NULL,
|
||||
`note_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`note_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='user notes';
|
||||
|
||||
-- Foreign key constraint
|
||||
ALTER TABLE `notes`
|
||||
ADD CONSTRAINT `notes_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;
|
||||
|
||||
@@ -2,7 +2,7 @@ CREATE TABLE IF NOT EXISTS `messages` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`sender_id` int(11) NOT NULL,
|
||||
`receiver_id` int(11) DEFAULT NULL,
|
||||
`group_type` enum('admins','moderators','all_users') DEFAULT NULL,
|
||||
`group_type` enum('admins','moderators','all_users','global') DEFAULT NULL,
|
||||
`subject` varchar(255) NOT NULL,
|
||||
`message` text NOT NULL,
|
||||
`is_read` tinyint(1) NOT NULL DEFAULT 0,
|
||||
@@ -11,7 +11,8 @@ CREATE TABLE IF NOT EXISTS `messages` (
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `sender_id` (`sender_id`),
|
||||
KEY `receiver_id` (`receiver_id`),
|
||||
KEY `is_read` (`is_read`)
|
||||
KEY `is_read` (`is_read`),
|
||||
KEY `group_type` (`group_type`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
-- Foreign key constraints
|
||||
|
||||
Reference in New Issue
Block a user