Skip to content

Commit ce953a5

Browse files
committed
🥲 Refactor authentication and user management to use SQLite with Drizzle ORM
- Updated session and user controllers to utilize SQLite client and parameterized queries. - Removed legacy Neon database migration and seeding files. - Implemented new SQLite-based database initialization and query functions. - Adjusted database schema to align with SQLite conventions (e.g., UUID to TEXT). - Enhanced audit logging to support SQLite. - Updated migration runner to work with SQLite. - Ensured proper error handling and logging throughout the database operations.
1 parent b87d64d commit ce953a5

25 files changed

+3107
-1068
lines changed

‎drizzle.config.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import type { Config } from 'drizzle-kit';
2+
3+
export default {
4+
schema: './src/data/schema/schema.ts',
5+
out: './src/data/migrations',
6+
dialect: 'sqlite',
7+
dbCredentials: {
8+
url: './src/data/app.db',
9+
},
10+
} satisfies Config;

‎env.json.example‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
]
1818
},
1919
"database": {
20-
"connectionString": "postgresql://username:password@your-neon-hostname.neon.tech/dbname?sslmode=require"
20+
"dbPath": "src/data/app.db",
21+
"autoRunMigrations": true,
22+
"autoRunSeeds": false
2123
},
2224
"auth": {
2325
"jwtSecret": "your-super-secret-jwt-key-min-32-characters-long",

0 commit comments

Comments
 (0)