Use Drizzle adapter and Drizzle CLI auth migrations

This commit is contained in:
2026-02-24 16:21:03 -05:00
parent 11eeafafef
commit 0ab464f910
10 changed files with 1133 additions and 110 deletions

18
drizzle.config.ts Normal file
View File

@@ -0,0 +1,18 @@
import { defineConfig } from 'drizzle-kit';
const databaseUrl = process.env.DATABASE_URL?.trim();
if (!databaseUrl) {
throw new Error('DATABASE_URL is required to run Drizzle migrations.');
}
export default defineConfig({
schema: './lib/server/db/schema.ts',
out: './drizzle',
dialect: 'postgresql',
dbCredentials: {
url: databaseUrl
},
strict: true,
verbose: true
});