mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix: Previous Column in Transactions Unique
This commit is contained in:
parent
bef872a2f5
commit
4b46f52f1e
13
database/migrations/0036-unique_previous_in_transactions.ts
Normal file
13
database/migrations/0036-unique_previous_in_transactions.ts
Normal file
@ -0,0 +1,13 @@
|
||||
/* MIGRATION TO SET previous COLUMN UNIQUE in TRANSACTION table
|
||||
*/
|
||||
|
||||
/* 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 UNIQUE(`previous`);')
|
||||
}
|
||||
|
||||
export async function downgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
||||
await queryFn('ALTER TABLE `transactions` DROP INDEX `previous`;')
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user