Database Management Guide
Docklift uses SQLite as its database, managed by Prisma ORM.
Schema Location
The Prisma schema is located at:
backend/prisma/schema.prisma
Core Commands
Run these commands from the backend/ directory:
View Data
- Open Studio:
Opens a web GUI to view and edit the database content.bun run db:studio
Schema Changes
- Edit Schema: Modify
backend/prisma/schema.prisma. - Generate Client:
Updates the generated TypeScript client inbun run db:generatenode_modules. - Push Changes:
Applies the schema changes to the local SQLite database file (bun run db:pushbackend/prisma/dev.dbor similar).
Reset
- Reset Database:
WARNING: This will delete all data.bun run db:push --force-reset
Key Models
- User: Admin users for the application.
- Project: Represents a deployed application (container).
- Deployment: History of builds/deploys for a project.
- EnvVariable: Environment variables for projects.
- Settings: System-wide settings.
Troubleshooting
- If the database seems out of sync with the client, run
bun run db:generate. - If you encounter migration errors,
db:pushusually resolves dev inconsistencies for SQLite.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.