mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
17 lines
582 B
TypeScript
17 lines
582 B
TypeScript
/* 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(`
|
|
CREATE TABLE openai_threads (
|
|
id VARCHAR(128) PRIMARY KEY,
|
|
createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
user_id int(10) unsigned NOT NULL
|
|
) ENGINE = InnoDB;
|
|
`)
|
|
}
|
|
|
|
export async function downgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
|
await queryFn(`DROP TABLE openai_threads`)
|
|
}
|