Work in progress on refactoring all mail sending to use the message sender an sender workers. No yet finished.

This commit is contained in:
Tomas Bures 2019-06-29 23:19:56 +02:00
parent 355e03900a
commit 4e9f6bd57b
22 changed files with 811 additions and 444 deletions

View file

@ -0,0 +1,25 @@
exports.up = (knex, Promise) => (async() => {
const queued = await knex('queued');
for (const queuedEntry of queued) {
const data = JSON.parse(queuedEntry.data);
data.listId = queuedEntry.list;
data.subscriptionId = queuedEntry.subscription;
knex('queued')
.where('id', queuedEntry.id)
.update({
data: JSON.stringify(data)
});
}
await knex.schema.table('queued', table => {
table.dropColumn('list');
table.dropColumn('subscription');
});
})();
exports.down = (knex, Promise) => (async() => {
})();