mirror of
https://github.com/clucraft/PriceGhost.git
synced 2026-07-14 16:32:14 +02:00
fix: add openai_base_url migration to init-db.ts so fresh deployments get the column
This commit is contained in:
parent
89c71a3dde
commit
a3ad25a4ae
1 changed files with 6 additions and 0 deletions
|
|
@ -52,6 +52,12 @@ const initDatabase = async () => {
|
||||||
`);
|
`);
|
||||||
console.log('Created price_history index');
|
console.log('Created price_history index');
|
||||||
|
|
||||||
|
// Migration: Add openai_base_url column for LiteLLM/OpenAI-compatible proxy support
|
||||||
|
await client.query(`
|
||||||
|
ALTER TABLE users ADD COLUMN IF NOT EXISTS openai_base_url VARCHAR(512);
|
||||||
|
`);
|
||||||
|
console.log('Migration: added openai_base_url column');
|
||||||
|
|
||||||
await client.query('COMMIT');
|
await client.query('COMMIT');
|
||||||
console.log('Database initialization complete');
|
console.log('Database initialization complete');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue