1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-12-26 05:28:50 +00:00

Fix bad column name

This commit is contained in:
Pierre HUBERT 2021-03-04 17:09:52 +01:00
parent d680b2bb49
commit 2cc8984dfa
2 changed files with 3 additions and 3 deletions

View File

@ -79,7 +79,7 @@ CREATE TABLE `comunic_conversations_messages` (
`user_id` int DEFAULT NULL,
`time_sent` int DEFAULT NULL,
`message` text,
`filepath` varchar(255) DEFAULT NULL,
`file_path` varchar(255) DEFAULT NULL,
`file_size` int DEFAULT NULL,
`file_name` varchar(255) DEFAULT NULL,
`file_thumbnail` varchar(255) DEFAULT NULL,

View File

@ -2,12 +2,12 @@
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
add column filepath varchar(255) default null,
add column file_path varchar(255) default null,
add column file_size int default null,
add column file_name varchar(255) default null,
add column file_thumbnail varchar(255) 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 file_path = 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;
-- Conversations members table