Added Docker

This commit is contained in:
Tiemen van Olst
2025-09-09 08:52:28 +02:00
parent 7f1595dddd
commit 72d9f5e642
29 changed files with 10623 additions and 193 deletions

View File

@@ -0,0 +1,16 @@
import { sequelize } from '~/server/database'
export default defineEventHandler(async (event) => {
try {
// Import and run migrations
const { execSync } = await import('child_process')
execSync('npx sequelize-cli db:migrate', { stdio: 'inherit' })
return { success: true, message: 'Database migrated successfully' }
} catch (error) {
throw createError({
statusCode: 500,
statusMessage: 'Failed to migrate database'
})
}
})