# clone project
git clone git@github.com:ptessier/chunk.git
# install the dependencies
yarn install
# deploy the containers
docker-compose up -d
# start the server
yarn start
Update the database and the related files in database/init
folder,
# update schema.prisma from the database
yarn prisma introspect
# update the prisma client
yarn prisma generate
Update schema.prisma
file,
# create a migration
prisma migrate save --experimental
# update the database with the migration
prisma migrate up --experimental
Finally, update the schema in database/init
.
# dump a postgres docker container
docker exec [container-name] pg_dump -U postgres --schema-only --no-owner [db-name] > database/init/schema.sql