diff --git a/docs/db_struct.sql b/docs/db_struct.sql index 4587e60..006cfa1 100644 --- a/docs/db_struct.sql +++ b/docs/db_struct.sql @@ -61,16 +61,16 @@ CREATE TABLE `comunic_user_access_tokens` ( DROP TABLE IF EXISTS `comunic_conversations_list`; CREATE TABLE `comunic_conversations_list` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) DEFAULT NULL, + `id` int NOT NULL AUTO_INCREMENT, `name` varchar(50) DEFAULT NULL, - `last_active` int(11) DEFAULT NULL, - `creation_time` int(11) DEFAULT NULL, - `can_everyone_add_members` tinyint(4) DEFAULT '1', + `creation_time` int DEFAULT NULL, + `can_everyone_add_members` tinyint DEFAULT '1', + `color` varchar(6) DEFAULT NULL, + `background` varchar(255) DEFAULT NULL, + `group_id` 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 989ae21..4c70c2a 100644 --- a/docs/migration.sql +++ b/docs/migration.sql @@ -16,4 +16,12 @@ ALTER TABLE comunic_conversations_members rename column time_add to added_on; alter table comunic_conversations_members drop column saw_last_message; alter table comunic_conversations_members add column is_admin int default 1, - add column last_message_seen int default 0; \ No newline at end of file + add column last_message_seen int default 0; + +-- Conversations list table +alter table comunic_conversations_list drop column user_id; +alter table comunic_conversations_list drop column last_active; +alter table comunic_conversations_list + add column color varchar(6), + add column background varchar(255), + add group_id int; \ No newline at end of file