Fix - message sent to a list not associated with a campaign couldn't be shown in archive - to know which message to show even if the list is not at the campaign, we store test messages in table test_messages
14 lines
628 B
JavaScript
14 lines
628 B
JavaScript
exports.up = (knex, Promise) => (async() => {
|
|
await knex.schema.raw('CREATE TABLE `test_messages` (\n' +
|
|
' `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n' +
|
|
' `campaign` int(10) unsigned NOT NULL,\n' +
|
|
' `list` int(10) unsigned NOT NULL,\n' +
|
|
' `subscription` int(10) unsigned NOT NULL,\n' +
|
|
' `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n' +
|
|
' PRIMARY KEY (`id`),\n' +
|
|
' UNIQUE KEY `cls` (`campaign`, `list`, `subscription`)\n' +
|
|
') ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n');
|
|
})();
|
|
|
|
exports.down = (knex, Promise) => (async() => {
|
|
})();
|