Docs
Update schema & migrate changes
Learn how to update your database schema and migrate changes with Drizzle in supastarter.
Drizzle
To update your database schema, you can simply edit the packages/database/drizzle/schema/[postgres|mysql|sqlite].ts file.
You can find more information about the Drizzle schema file in the official documentation.
The starter keeps schema in source and applies it with push. It does not commit generated SQL under packages/database/drizzle/migrations/. You can still run migrate if you prefer to generate and manage migrations yourself.
Migrate changes (optional)
To migrate your changes, you can run the following command:
pnpm --filter database migratePush your changes to the database
To push your changes to the database, you can run the following command:
pnpm --filter database push