1
0
Fork 0
mirror of synced 2024-06-26 18:10:51 +12:00
budibase/packages/worker/src/api/controllers/system/migrations.ts

14 lines
340 B
TypeScript

const { migrate, MIGRATIONS } = require("../../../migrations")
export const runMigrations = async (ctx: any) => {
const options = ctx.request.body
// don't await as can take a while, just return
migrate(options)
ctx.status = 200
}
export const fetchDefinitions = async (ctx: any) => {
ctx.body = MIGRATIONS
ctx.status = 200
}