From 37db3c1cb2d55b7e0796fe171e521d1326aaff62 Mon Sep 17 00:00:00 2001 From: Orta Therox Date: Wed, 27 Dec 2023 19:51:21 +0000 Subject: [PATCH] Adds a note about the two commands you will use with your schema to the top of the schema file (#8589) It was years ago when I noted that I should send this to the template, I've never had to look at docs after adding these - they're a bit terse, open to changing the wording. --- __fixtures__/test-project/api/db/schema.prisma | 6 ++++++ .../create-redwood-app/templates/js/api/db/schema.prisma | 6 ++++++ .../create-redwood-app/templates/ts/api/db/schema.prisma | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/__fixtures__/test-project/api/db/schema.prisma b/__fixtures__/test-project/api/db/schema.prisma index 5f39c297c0b8..c0ebb5b0e521 100644 --- a/__fixtures__/test-project/api/db/schema.prisma +++ b/__fixtures__/test-project/api/db/schema.prisma @@ -1,3 +1,9 @@ +// Don't forget to tell Prisma about your edits to this file using +// `yarn rw prisma migrate dev` or `yarn rw prisma db push`. +// `migrate` is like committing while `push` is for prototyping. +// Read more about both here: +// https://www.prisma.io/docs/orm/prisma-migrate + datasource db { provider = "sqlite" url = env("DATABASE_URL") diff --git a/packages/create-redwood-app/templates/js/api/db/schema.prisma b/packages/create-redwood-app/templates/js/api/db/schema.prisma index 3dea71a68f23..8c8666606f09 100644 --- a/packages/create-redwood-app/templates/js/api/db/schema.prisma +++ b/packages/create-redwood-app/templates/js/api/db/schema.prisma @@ -1,3 +1,9 @@ +// Don't forget to tell Prisma about your edits to this file using +// `yarn rw prisma migrate dev` or `yarn rw prisma db push`. +// `migrate` is like committing while `push` is for prototyping. +// Read more about both here: +// https://www.prisma.io/docs/orm/prisma-migrate + datasource db { provider = "sqlite" url = env("DATABASE_URL") diff --git a/packages/create-redwood-app/templates/ts/api/db/schema.prisma b/packages/create-redwood-app/templates/ts/api/db/schema.prisma index 3dea71a68f23..8c8666606f09 100644 --- a/packages/create-redwood-app/templates/ts/api/db/schema.prisma +++ b/packages/create-redwood-app/templates/ts/api/db/schema.prisma @@ -1,3 +1,9 @@ +// Don't forget to tell Prisma about your edits to this file using +// `yarn rw prisma migrate dev` or `yarn rw prisma db push`. +// `migrate` is like committing while `push` is for prototyping. +// Read more about both here: +// https://www.prisma.io/docs/orm/prisma-migrate + datasource db { provider = "sqlite" url = env("DATABASE_URL")