feat: Allow data imports larger than the standard attachment size (#4449)
* feat: Allow data imports larger than the standard attachment size * Use correct preset for data imports * Cleanup of expired attachments * lint
This commit is contained in:
22
server/migrations/20221120151710-attachment-expiry.js
Normal file
22
server/migrations/20221120151710-attachment-expiry.js
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
up: async (queryInterface, Sequelize) => {
|
||||
await queryInterface.sequelize.transaction(async (transaction) => {
|
||||
await queryInterface.addColumn("attachments", "expiresAt", {
|
||||
type: Sequelize.DATE,
|
||||
allowNull: true,
|
||||
transaction,
|
||||
});
|
||||
await queryInterface.addIndex("attachments", ["expiresAt"], {
|
||||
transaction
|
||||
});
|
||||
});
|
||||
},
|
||||
down: async (queryInterface) => {
|
||||
await queryInterface.sequelize.transaction(async (transaction) => {
|
||||
await queryInterface.removeColumn("attachments", "expiresAt", { transaction });
|
||||
await queryInterface.removeIndex("attachments", ["expiresAt"], { transaction });
|
||||
});
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user