add transactionLinkId Column to transactions table

This commit is contained in:
Moriz Wahl 2022-03-11 15:54:59 +01:00
parent b5ef464222
commit b3f7fd28a1

View File

@ -0,0 +1,14 @@
/* MIGRATION TO ADD transactionLinkId FIELDTO TRANSACTION */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
/* eslint-disable @typescript-eslint/no-explicit-any */
export async function upgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
await queryFn(
'ALTER TABLE `transactions` ADD COLUMN `transactionLinkId` int UNSIGNED DEFAULT NULL;',
)
}
export async function downgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
await queryFn('ALTER TABLE `transactions` DROP COLUMN `transactionLinkId`;')
}