chore: SQLite verwijderd — alleen PostgreSQL via Neon
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ffe3815598
commit
b541379964
10 changed files with 26 additions and 811 deletions
|
|
@ -14,19 +14,11 @@ async function main() {
|
|||
const url = process.env.DATABASE_URL
|
||||
if (!url) throw new Error('DATABASE_URL is not set. Check .env.local')
|
||||
|
||||
if (url.startsWith('file:')) {
|
||||
// SQLite (local development)
|
||||
const { PrismaBetterSqlite3 } = await import('@prisma/adapter-better-sqlite3')
|
||||
const adapter = new PrismaBetterSqlite3({ url })
|
||||
prisma = new PrismaClient({ adapter })
|
||||
} else {
|
||||
// PostgreSQL (Neon / production)
|
||||
const { Pool } = await import('pg')
|
||||
const { PrismaPg } = await import('@prisma/adapter-pg')
|
||||
const pool = new Pool({ connectionString: url })
|
||||
const adapter = new PrismaPg(pool)
|
||||
prisma = new PrismaClient({ adapter })
|
||||
}
|
||||
const { Pool } = await import('pg')
|
||||
const { PrismaPg } = await import('@prisma/adapter-pg')
|
||||
const pool = new Pool({ connectionString: url })
|
||||
const adapter = new PrismaPg(pool)
|
||||
prisma = new PrismaClient({ adapter })
|
||||
|
||||
console.log('Seeding database...')
|
||||
|
||||
|
|
@ -204,7 +196,7 @@ async function main() {
|
|||
priority: 1,
|
||||
stories: [
|
||||
{ title: 'Cloud deployment (Vercel + Neon)', description: 'Als Developer wil ik de app deployen op Vercel met een Neon PostgreSQL-database.', acceptance_criteria: '- next build slaagt zonder fouten\n- Database-migraties worden uitgevoerd via Prisma', priority: 1 },
|
||||
{ title: 'Lokale modus', description: 'Als Developer wil ik de app volledig lokaal kunnen draaien met een lokale SQLite-database.', acceptance_criteria: '- npm run dev start de app lokaal\n- Database wordt aangemaakt via prisma db push', priority: 1 },
|
||||
{ title: 'Lokale modus', description: 'Als Developer wil ik de app lokaal kunnen draaien met een Neon PostgreSQL-database.', acceptance_criteria: '- npm run dev start de app lokaal\n- DATABASE_URL verwijst naar Neon connection string', priority: 1 },
|
||||
{ title: 'API-token authenticatie', description: 'Als Developer wil ik een API-token kunnen genereren in de app.', acceptance_criteria: '- Gebruiker kan een API-token aanmaken\n- Token wordt eenmalig getoond\n- Alle API-endpoints vereisen een geldig token', priority: 1 },
|
||||
],
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue