From 842e903d5b987dd23e82a423bddae75acdea0c9c Mon Sep 17 00:00:00 2001
From: mykhailo.dubovskyi
Date: Wed, 18 Apr 2018 15:57:53 +0300
Subject: Like -> Reaction

---
 juick-server-jdbc/src/main/resources/schema.sql | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

(limited to 'juick-server-jdbc/src/main/resources/schema.sql')

diff --git a/juick-server-jdbc/src/main/resources/schema.sql b/juick-server-jdbc/src/main/resources/schema.sql
index ec28a456..59c979d5 100644
--- a/juick-server-jdbc/src/main/resources/schema.sql
+++ b/juick-server-jdbc/src/main/resources/schema.sql
@@ -39,13 +39,21 @@ CREATE TABLE IF NOT EXISTS `facebook` (
   `crosspost` tinyint(1) unsigned NOT NULL DEFAULT '1',
   KEY `user_id` (`user_id`)
 );
+
+CREATE TABLE IF NOT EXISTS `reactions` (
+ `like_id` int(10) unsigned NOT NULL,
+ `description` varchar (100) NOT NULL
+);
 CREATE TABLE IF NOT EXISTS `favorites` (
   `user_id` int(10) unsigned NOT NULL,
   `message_id` int(10) unsigned NOT NULL,
   `ts` datetime NOT NULL,
-  UNIQUE KEY `user_id_2` (`user_id`,`message_id`),
-  KEY `message_id` (`message_id`)
+   `like_id` int(10),
+  foreign key (like_id) references reactions(like_id)
 );
+
+
+
 CREATE TABLE IF NOT EXISTS `friends_facebook` (
   `user_id` int(10) unsigned NOT NULL,
   `friend_id` bigint(20) unsigned NOT NULL,
-- 
cgit v1.2.3

