From 1fc6f08b1961943ec9e7333bd63e585bc8c05d93 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 3 Apr 2021 18:01:21 +0200 Subject: [PATCH] Update database structure --- docs/db_struct.sql | 2 ++ docs/migration.sql | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/db_struct.sql b/docs/db_struct.sql index ff72406..c2e0083 100644 --- a/docs/db_struct.sql +++ b/docs/db_struct.sql @@ -68,10 +68,12 @@ CREATE TABLE `comunic_conversations_list` ( `color` varchar(6) DEFAULT NULL, `logo` varchar(255) DEFAULT NULL, `group_id` int DEFAULT NULL, + `min_group_membership_level` int DEFAULT NULL, `last_activity` int DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; + DROP TABLE IF EXISTS `comunic_conversations_messages`; CREATE TABLE `comunic_conversations_messages` ( `id` int NOT NULL AUTO_INCREMENT, diff --git a/docs/migration.sql b/docs/migration.sql index bc127e7..9bd68c6 100644 --- a/docs/migration.sql +++ b/docs/migration.sql @@ -1,3 +1,6 @@ -- Groups table -ALTER TABLE `comunic`.`comunic_groups` +ALTER TABLE `comunic_groups` ADD COLUMN `is_members_list_public` TINYINT(1) NULL DEFAULT 0 AFTER `url`; + +ALTER TABLE `comunic_conversations_list` + ADD COLUMN `min_group_membership_level` INT NULL AFTER `group_id`;