mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-22 13:29:21 +00:00
Update conversation members table
This commit is contained in:
parent
13b9db1e4c
commit
bea7be58ae
@ -88,17 +88,19 @@ CREATE TABLE `comunic_conversations_messages` (
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `comunic_conversations_users`;
|
DROP TABLE IF EXISTS `comunic_conversations_members`;
|
||||||
CREATE TABLE `comunic_conversations_users` (
|
CREATE TABLE `comunic_conversations_members` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
`id` int NOT NULL AUTO_INCREMENT,
|
||||||
`conv_id` int(11) DEFAULT NULL,
|
`conv_id` int DEFAULT NULL,
|
||||||
`user_id` int(11) DEFAULT NULL,
|
`user_id` int DEFAULT NULL,
|
||||||
`time_add` int(11) DEFAULT NULL,
|
`added_on` int DEFAULT NULL,
|
||||||
`following` int(1) DEFAULT '0',
|
`following` int DEFAULT '0',
|
||||||
`saw_last_message` int(1) DEFAULT NULL,
|
`is_admin` int DEFAULT '1',
|
||||||
|
`last_message_seen` int DEFAULT '0',
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `comunic_groups`;
|
DROP TABLE IF EXISTS `comunic_groups`;
|
||||||
CREATE TABLE `comunic_groups` (
|
CREATE TABLE `comunic_groups` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Conversations table
|
-- Conversations messages table
|
||||||
alter table comunic_conversations_messages rename column time_insert to time_sent;
|
alter table comunic_conversations_messages rename column time_insert to time_sent;
|
||||||
alter table comunic_conversations_messages modify message TEXT;
|
alter table comunic_conversations_messages modify message TEXT;
|
||||||
alter table comunic_conversations_messages
|
alter table comunic_conversations_messages
|
||||||
@ -8,4 +8,12 @@ alter table comunic_conversations_messages
|
|||||||
add column file_thumbnail varchar(255) default null,
|
add column file_thumbnail varchar(255) default null,
|
||||||
add column file_type varchar(128) default null;
|
add column file_type varchar(128) default null;
|
||||||
update comunic_conversations_messages set filepath = image_path, file_size = 10, file_type = "image/png", file_name = "image.png" where image_path is not null and id >= 1;
|
update comunic_conversations_messages set filepath = image_path, file_size = 10, file_type = "image/png", file_name = "image.png" where image_path is not null and id >= 1;
|
||||||
alter table comunic_conversations_messages drop column image_path;
|
alter table comunic_conversations_messages drop column image_path;
|
||||||
|
|
||||||
|
-- Conversations members table
|
||||||
|
ALTER TABLE `comunic_conversations_users` RENAME TO `comunic_conversations_members` ;
|
||||||
|
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;
|
Loading…
Reference in New Issue
Block a user