Skip to content

Commit

Permalink
Sqlite ppg migration (#7570)
Browse files Browse the repository at this point in the history
* chore: update readme.md

* chore: update readme

* chore: update readmes to be more consistent

* chore: add typedsql to the examples

* chore: add more code fixes

* chore: convert fluent api queries

* chore: clean up spaces

* refine: add more details

* chore: refine content further

* fix: tests for jest

* fix: add tests in sequence

* fix: add database url

* fix: add seeders to tests

* fix: update tests

* fix: typedsql tests

* fix: test scripts

* fix: remove accelerate from typedsql

* fix: remove migrations for typedsql

* fix: postgis db url

* fix: tests

* update express README

* update express README

* remove @latest from prisma init command because we're using the local prisma cli version

* update titles of READMEs to inlcude PPg

* simplify intro sentences of readmes

* add convenience options to try-prisma commands

* update dummy connection string

* update region and project name prompts as bullets

* update .env file creation and add curl calls

* update readmes

* add curl commands

* update readmes

* update main readme

---------

Co-authored-by: Nikolas Burk <nikolas.burk@gmail.com>
  • Loading branch information
ankur-arch and nikolasburk authored Feb 24, 2025
1 parent 333d61d commit 422126a
Show file tree
Hide file tree
Showing 199 changed files with 6,914 additions and 4,214 deletions.
4 changes: 4 additions & 0 deletions .github/tests/orm/express/run.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

set -eu

export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma db seed
npm run dev &
pid=$!

Expand Down
4 changes: 4 additions & 0 deletions .github/tests/orm/fastify-graphql-sdl-first/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

set -eu

export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma db seed
npm run dev &
pid=$!

Expand Down
4 changes: 4 additions & 0 deletions .github/tests/orm/fastify-graphql/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

set -eu

export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma db seed
npm run dev &
pid=$!

Expand Down
4 changes: 4 additions & 0 deletions .github/tests/orm/fastify/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

set -eu

export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma db seed
npm run dev &
pid=$!

Expand Down
5 changes: 5 additions & 0 deletions .github/tests/orm/graphql-auth/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

set -eu


export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma db seed
npm run dev &
pid=$!

Expand Down
6 changes: 5 additions & 1 deletion .github/tests/orm/graphql-nexus/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@

set -eu

export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma db seed
npm run dev &
pid=$!

sleep 20

npx newman run ../../.github/tests/postman_collections/graphql.json --bail
npx newman run ../../.github/tests/postman_collections/graphql.json --bail --verbose

kill "$pid"
4 changes: 4 additions & 0 deletions .github/tests/orm/graphql-sdl-first/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

set -eu

export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma db seed
npm run dev &
pid=$!

Expand Down
6 changes: 5 additions & 1 deletion .github/tests/orm/graphql-subscriptions/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

set -eu

npm install
export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma db seed
npm run dev &
pid=$!

Expand Down
4 changes: 4 additions & 0 deletions .github/tests/orm/graphql-typegraphql-crud/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

set -eu

export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma db seed
npm run dev &
pid=$!

Expand Down
4 changes: 4 additions & 0 deletions .github/tests/orm/graphql-typegraphql/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

set -eu

export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma db seed
npm run dev &
pid=$!

Expand Down
5 changes: 4 additions & 1 deletion .github/tests/orm/graphql/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

set -eu

export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma migrate reset -f
npx prisma db seed
npm run dev &
pid=$!

Expand Down
5 changes: 5 additions & 0 deletions .github/tests/orm/grpc/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@

set -eu

export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma db seed
npm run dev &
pid=$!


sleep 10

npm run feed
Expand Down
4 changes: 4 additions & 0 deletions .github/tests/orm/hapi-graphql-sdl-first/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

set -eu

export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma db seed
npm run dev &
pid=$!

Expand Down
4 changes: 4 additions & 0 deletions .github/tests/orm/hapi-graphql/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

set -eu

export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma db seed
npm run dev &
pid=$!

Expand Down
4 changes: 4 additions & 0 deletions .github/tests/orm/hapi/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

set -eu

export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma db seed
npm run dev &
pid=$!

Expand Down
4 changes: 4 additions & 0 deletions .github/tests/orm/koa/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

set -eu

export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma db seed
npm run dev &
pid=$!

Expand Down
6 changes: 5 additions & 1 deletion .github/tests/orm/nest-graphql-sdl-first/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@

set -eu

export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma db seed
npm run dev &
pid=$!

sleep 30
sleep 20

npx newman run ../../.github/tests/postman_collections/graphql-nestjs.json --bail

Expand Down
4 changes: 4 additions & 0 deletions .github/tests/orm/nest-graphql/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

set -eu

export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma db seed
npm run dev &
pid=$!

Expand Down
4 changes: 4 additions & 0 deletions .github/tests/orm/nest/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

set -eu

export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma db seed
npm run dev &
pid=$!

Expand Down
4 changes: 4 additions & 0 deletions .github/tests/orm/nextjs-graphql/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

set -eu

export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma db seed
npm run dev &
pid=$!

Expand Down
4 changes: 4 additions & 0 deletions .github/tests/orm/nextjs/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

set -eu

export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma db seed
npm run dev &
pid=$!

Expand Down
6 changes: 5 additions & 1 deletion .github/tests/orm/nuxt/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

set -eu

npm install
export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma db seed
npm run dev &
pid=$!

Expand Down
6 changes: 5 additions & 1 deletion .github/tests/orm/remix/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

set -eu

npm install
export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma db seed
npm run dev &
pid=$!

Expand Down
3 changes: 3 additions & 0 deletions .github/tests/orm/script/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

set -eu

export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npm run dev
6 changes: 5 additions & 1 deletion .github/tests/orm/sveltekit/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

set -eu

npm install
export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma db seed
npm run dev &
pid=$!

Expand Down
11 changes: 11 additions & 0 deletions .github/tests/orm/testing-express/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,16 @@

set -eu

# Check if DATABASE_URL is set
if [ -z "${PPG_TEST_DATABASE_URL:-}" ]; then
echo "Error: DATABASE_URL environment variable is not set."
exit 1
fi

export DATABASE_URL="${PPG_TEST_DATABASE_URL}"

npm install
npx prisma migrate reset --force --skip-seed
npx prisma migrate dev --name init
npx prisma db seed
npm run test
4 changes: 2 additions & 2 deletions .github/tests/orm/typedsql/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
set -eu

npm install
npx prisma db push --skip-generate
npx prisma migrate dev --name init
npx prisma generate --sql
npm run dev
npm run test
Loading

0 comments on commit 422126a

Please sign in to comment.