Files
elysiacv/src/db/schema.ts
Tuan-Dat Tran 3de8f6a971 feat(db): Implement schema migrations and add Projects section
Introduces a custom migration system for SQLite, allowing incremental and safe schema evolution.
Adds a new 'Projects' section to the CV, including database tables, public UI, and full management
in the admin dashboard with live editing, drag-and-drop reordering, and collapsible forms.

Updates:
-  and  for schema management.
-  with  script.
-  to use migrations.
-  to rely on migrations.
-  and  for new project data operations.
-  and  for Projects UI.
-  and  to integrate the Projects section.

Also updates:
-  to automatically import Keycloak realm on startup.
-  for the Elysia app build.
-  with refined print styles (omitting socials and about).
2025-11-22 11:20:03 +01:00

8 lines
172 B
TypeScript

import { Database } from "bun:sqlite";
const db = new Database("cv.sqlite", { create: true });
// Enable foreign keys
db.run("PRAGMA foreign_keys = ON;");
export { db };