mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-14 08:35:29 +08:00
Switch type of Metadata value column
Summary: Found a funny send-later bug I didn't catch when testing on staging: sometimes the data we're saving in the metadata table overflows. That's because MySQL's TEXT column are at most 64k, which is easy to reach when you have a draft + clearbit information and additional stuff. To work around this, I decided to switch the database type of the metadata table to LONGTEXT. Since it can store 4Gb of text, we should be good. This diff makes those code changes. Obviously, we'll have to run migrations both on staging and prod. Test Plan: Ran a basic smoke test. Shouldn't break anything. Reviewers: juan, evan Reviewed By: evan Differential Revision: https://phab.nylas.com/D4250
This commit is contained in:
parent
1f9c5120cd
commit
3e3b0b84f1
1 changed files with 1 additions and 1 deletions
|
@ -3,7 +3,7 @@ const Sequelize = require('sequelize');
|
|||
module.exports = {
|
||||
JSONColumn(fieldName, options = {}) {
|
||||
return Object.assign(options, {
|
||||
type: Sequelize.TEXT,
|
||||
type: options.columnType || Sequelize.TEXT,
|
||||
get() {
|
||||
const val = this.getDataValue(fieldName);
|
||||
if (!val) {
|
||||
|
|
Loading…
Add table
Reference in a new issue