Fix big user export file size
This commit is contained in:
parent
81d4d557f7
commit
e7ebcb16ac
3 changed files with 26 additions and 2 deletions
|
@ -45,7 +45,7 @@ import { cpus } from 'os'
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
const LAST_MIGRATION_VERSION = 835
|
const LAST_MIGRATION_VERSION = 840
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
24
server/core/initializers/migrations/0840-user-export-size.ts
Normal file
24
server/core/initializers/migrations/0840-user-export-size.ts
Normal 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
|
||||||
|
}
|
|
@ -55,7 +55,7 @@ export class UserExportModel extends SequelizeModel<UserExportModel> {
|
||||||
error: string
|
error: string
|
||||||
|
|
||||||
@AllowNull(true)
|
@AllowNull(true)
|
||||||
@Column
|
@Column(DataType.BIGINT)
|
||||||
size: number
|
size: number
|
||||||
|
|
||||||
@AllowNull(false)
|
@AllowNull(false)
|
||||||
|
|
Loading…
Add table
Reference in a new issue