TurboStack uses SQLite as Database by default. All the data will be stored in aDocumentation Index
Fetch the complete documentation index at: https://docs.turbostack.io/llms.txt
Use this file to discover all available pages before exploring further.
dev.db file inside apps/web/prisma folder.
If you want the Database Provider, you can achieve this following the prisma documentation.
Database Schema
Here’s an image of the database schema:-
Tables handled by NextAuth
- User: The
Usermodel is for retrieved information from authentication provider (name, email, image) - Account: The
Accountmodel is for information about accounts associated with aUser. A singleUsercan have multipleAccount, but eachAccountcan only have oneUser. - Session: The
Sessionmodel is used for database sessions and it can store arbitrary data for an active user session. A singleUsercan have multipleSession, each Session can only have oneUser. - VerificationToken: The
VerificationTokenmodel is used to temporary tokens (used for magic-link login).
- User: The
-
Tables handled by TurboStack
- Project: The
Projectmodel is for information about projects associated with aUser. A singleUsercan have multipleProject, and a singleProjectcan have multipleUser. - ProjectUser: The
ProjectUsermodel is for information about the relation between anUserand aProject. - ProjectInvite: The
ProjectInvitemodel is for information about the invites created for aProject. A singleProjectcan have multipleProjectInvite, but eachProjectInvitecan only have oneProject.
- Project: The
Migrations
Migrations are controlled sets of changes developed to modify the structure of tables within a database. Migrations help transition database schemas from their current state to a new desired state, whether that involves adding tables and columns, removing elements, splitting fields, or changing types and constraints. All migrations are stored in the source code and help you and your team keep track of all the changes made to your database.Adding new migrations
When you change yourschema.prisma file and runs the following command:
.sql migration file, with all the changes applied to the schema.