db: increase files.size column size to bigint
This commit is contained in:
parent
e84f45b812
commit
c53ba1972d
src
@ -33,6 +33,7 @@ import AuthToken from "./models/AuthToken";
|
|||||||
import {MagicLinkActionType} from "./controllers/MagicLinkActionType";
|
import {MagicLinkActionType} from "./controllers/MagicLinkActionType";
|
||||||
import {Request} from "express";
|
import {Request} from "express";
|
||||||
import CreateFilesTable from "./migrations/CreateFilesTable";
|
import CreateFilesTable from "./migrations/CreateFilesTable";
|
||||||
|
import IncreaseFilesSizeField from "./migrations/IncreaseFilesSizeField";
|
||||||
|
|
||||||
export default class App extends Application {
|
export default class App extends Application {
|
||||||
private readonly port: number;
|
private readonly port: number;
|
||||||
@ -51,6 +52,7 @@ export default class App extends Application {
|
|||||||
CreateMagicLinksTable,
|
CreateMagicLinksTable,
|
||||||
CreateAuthTokensTable,
|
CreateAuthTokensTable,
|
||||||
CreateFilesTable,
|
CreateFilesTable,
|
||||||
|
IncreaseFilesSizeField,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
12
src/migrations/IncreaseFilesSizeField.ts
Normal file
12
src/migrations/IncreaseFilesSizeField.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import Migration from "wms-core/db/Migration";
|
||||||
|
import {Connection} from "mysql";
|
||||||
|
|
||||||
|
export default class IncreaseFilesSizeField extends Migration {
|
||||||
|
public async install(connection: Connection): Promise<void> {
|
||||||
|
await this.query('ALTER TABLE files MODIFY size BIGINT UNSIGNED', connection);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async rollback(connection: Connection): Promise<void> {
|
||||||
|
await this.query('ALTER TABLE files MODIFY size INT UNSIGNED', connection);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user