ensure message html fields use LONGTEXT to be able to store inlined images

This commit is contained in:
Andris Reinman 2016-05-16 14:28:24 +03:00
parent f11b9e2db0
commit 4bc1dd785d
2 changed files with 17 additions and 1 deletions

View file

@ -1,3 +1,3 @@
{
"schemaVersion": 11
"schemaVersion": 12
}

View file

@ -0,0 +1,16 @@
# Header section
# Define incrementing schema version number
SET @schema_version = '12';
# Message source could include inlined images which might overflow on the default 65k field length
ALTER TABLE `campaigns` MODIFY `html` LONGTEXT;
ALTER TABLE `campaigns` MODIFY `html_prepared` LONGTEXT;
ALTER TABLE `campaigns` MODIFY `text` LONGTEXT;
ALTER TABLE `templates` MODIFY `html` LONGTEXT;
ALTER TABLE `templates` MODIFY `text` LONGTEXT;
# Footer section
LOCK TABLES `settings` WRITE;
INSERT INTO `settings` (`key`, `value`) VALUES('db_schema_version', @schema_version) ON DUPLICATE KEY UPDATE `value`=@schema_version;
UNLOCK TABLES;