aboutsummaryrefslogtreecommitdiff
path: root/juick-server-jdbc/src/main/resources
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server-jdbc/src/main/resources')
-rw-r--r--juick-server-jdbc/src/main/resources/juick.sql19
-rw-r--r--juick-server-jdbc/src/main/resources/schema.sql12
2 files changed, 27 insertions, 4 deletions
diff --git a/juick-server-jdbc/src/main/resources/juick.sql b/juick-server-jdbc/src/main/resources/juick.sql
index d13a06a2..4f15ba70 100644
--- a/juick-server-jdbc/src/main/resources/juick.sql
+++ b/juick-server-jdbc/src/main/resources/juick.sql
@@ -177,9 +177,11 @@ CREATE TABLE `favorites` (
`user_id` int(10) unsigned NOT NULL,
`message_id` int(10) unsigned NOT NULL,
`ts` datetime NOT NULL,
+ `like_id` int(10) unsigned NOT NULL DEFAULT '1',
UNIQUE KEY `user_id_2` (`user_id`,`message_id`),
KEY `user_id` (`user_id`),
- KEY `message_id` (`message_id`)
+ KEY `message_id` (`message_id`),
+ KEY `like_id` (`like_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -504,6 +506,19 @@ CREATE TABLE `presence` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
+-- Table structure for table `reactions`
+--
+
+DROP TABLE IF EXISTS `reactions`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `reactions` (
+ `like_id` int(10) unsigned NOT NULL,
+ `description` varchar(100) NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
-- Table structure for table `reader_links`
--
@@ -914,4 +929,4 @@ CREATE TABLE `wl_users` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2018-04-15 19:47:16
+-- Dump completed on 2018-04-20 7:47:13
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,