Add after statement to alter table.

This commit is contained in:
elweyn 2022-10-28 11:28:19 +02:00
parent a0bf498f40
commit 12f64a3cbd

View File

@ -2,7 +2,9 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
export async function upgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
await queryFn(`ALTER TABLE \`contributions\` ADD COLUMN \`updated_at\` datetime DEFAULT NULL;`)
await queryFn(
`ALTER TABLE \`contributions\` ADD COLUMN \`updated_at\` datetime DEFAULT NULL AFTER \`transaction_id\`;`,
)
}
export async function downgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {