npm i
docker compose up
# OR use the alias
npm run db:start
Push (DEV enviroment) - NOT RECOMENDED FOR PRODUCTION - pushes all schema changes to the db, does not create a migration file
npm run db:push
OR
Migrations (Production enviroment)
# Generates a new SQL migration file
npm run db:generate
# Executes the migration script on the connect db
npm run db:migrate
npm run dev
npm run db:drop # Drops a migration
# or start the server and open the app in a new browser tab
npm run db:studio # Opens a database inspector to edit and create data or interacting with the db
To create a production version of your app:
npm run build
You can preview the production build with npm run preview
.
To deploy your app, you may need to install an adapter for your target environment.