diff options
author | mykhailo.dubovskyi | 2018-04-18 15:57:53 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-04-20 11:03:47 +0300 |
commit | 842e903d5b987dd23e82a423bddae75acdea0c9c (patch) | |
tree | 59eabfb9969b6cbe00703674f8d3ddb7d2e029e0 /juick-server-jdbc/src/main/resources | |
parent | ef1c674b0dc1979e46e970ad67ccc7a9bb67b001 (diff) |
Like -> Reaction
Diffstat (limited to 'juick-server-jdbc/src/main/resources')
-rw-r--r-- | juick-server-jdbc/src/main/resources/juick.sql | 19 | ||||
-rw-r--r-- | juick-server-jdbc/src/main/resources/schema.sql | 12 |
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, |