Work in progress on refactoring all mail sending to use the message sender an sender workers. No yet finished.
This commit is contained in:
parent
355e03900a
commit
4e9f6bd57b
22 changed files with 811 additions and 444 deletions
|
@ -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() => {
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue