Fix big user export file size

This commit is contained in:
Chocobozzz 2024-05-16 11:15:57 +02:00
parent 81d4d557f7
commit e7ebcb16ac
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 26 additions and 2 deletions

View File

@ -45,7 +45,7 @@ import { cpus } from 'os'
// ---------------------------------------------------------------------------
const LAST_MIGRATION_VERSION = 835
const LAST_MIGRATION_VERSION = 840
// ---------------------------------------------------------------------------

View File

@ -0,0 +1,24 @@
import * as Sequelize from 'sequelize'
async function up (utils: {
transaction: Sequelize.Transaction
queryInterface: Sequelize.QueryInterface
sequelize: Sequelize.Sequelize
}): Promise<void> {
const { transaction } = utils
{
await utils.queryInterface.changeColumn('userExport', 'size', {
type: Sequelize.BIGINT,
allowNull: true
}, { transaction })
}
}
function down (options) {
throw new Error('Not implemented.')
}
export {
down, up
}

View File

@ -55,7 +55,7 @@ export class UserExportModel extends SequelizeModel<UserExportModel> {
error: string
@AllowNull(true)
@Column
@Column(DataType.BIGINT)
size: number
@AllowNull(false)