1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-26 07:19:22 +00:00
comunicapiv3/docs/migration.sql

11 lines
703 B
MySQL
Raw Normal View History

2021-03-02 15:46:41 +00:00
-- Conversations table
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_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;
alter table comunic_conversations_messages drop column image_path;