From b3ada7c25c0df86096d4b1a6f55e2b5a81e19d8f Mon Sep 17 00:00:00 2001 From: Demian Caldelas Date: Mon, 21 Feb 2022 13:02:09 -0300 Subject: [PATCH] Handy shortcut to start Prisma Studio (#1921) * Add fast access to start Prisma Studio * Updates docs * Minor fixes in docs Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- README.md | 2 +- apps/docs/pages/self-hosting/install.mdx | 4 ++-- apps/docs/pages/self-hosting/vercel.mdx | 4 ++-- package.json | 1 + packages/prisma/package.json | 1 + 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d752874104..45723a9fe4 100644 --- a/README.md +++ b/README.md @@ -178,7 +178,7 @@ yarn dx 1. Open [Prisma Studio](https://www.prisma.io/studio) to look at or modify the database content: ```sh - yarn prisma studio + yarn db-studio ``` 1. Click on the `User` model to add a new user record. diff --git a/apps/docs/pages/self-hosting/install.mdx b/apps/docs/pages/self-hosting/install.mdx index e627c195e0..da881b65a6 100644 --- a/apps/docs/pages/self-hosting/install.mdx +++ b/apps/docs/pages/self-hosting/install.mdx @@ -108,7 +108,7 @@ yarn dx 1. Run (in development mode) ```sh - yarn dev --scope=@calcom/web + yarn dev ``` ### Setting up your first user @@ -116,7 +116,7 @@ yarn dx 1. Open [Prisma Studio](https://www.prisma.io/studio) to look at or modify the database content: ```sh - npx prisma studio + yarn db-studio ``` 1. Click on the `User` model to add a new user record. diff --git a/apps/docs/pages/self-hosting/vercel.mdx b/apps/docs/pages/self-hosting/vercel.mdx index e60fc518d5..b92daf79c4 100644 --- a/apps/docs/pages/self-hosting/vercel.mdx +++ b/apps/docs/pages/self-hosting/vercel.mdx @@ -30,7 +30,7 @@ You need a PostgresDB database hosted somewhere. [Heroku](https://www.heroku.com 5. Open [Prisma Studio](https://www.prisma.io/studio) to look at or modify the database content: ``` - npx prisma studio + yarn db-studio ``` 6. Click on the `User` model to add a new user record. 7. Fill out the fields (remembering to encrypt your password with [BCrypt](https://bcrypt-generator.com/)) and click `Save 1 Record` to create your first user. @@ -42,5 +42,5 @@ You need a PostgresDB database hosted somewhere. [Heroku](https://www.heroku.com 1. Import from your forked repository 1. Set the Environment Variables 1. Set the root directory to `apps/web` -1. Override the build command to `cd ../.. && npx turbo run build --scope=@calcom/web --include-dependencies --no-deps` +1. Override the build command to `cd ../.. && yarn build` 1. Hit Deploy diff --git a/package.json b/package.json index d0bacc2b02..4240309239 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "clean": "turbo run clean && rm -rf node_modules", "db-deploy": "turbo run db-deploy", "db-seed": "turbo run db-seed", + "db-studio": "yarn workspace @calcom/prisma db-view", "deploy": "turbo run deploy", "dev": "turbo run dev --scope=\"@calcom/web\"", "docs-dev": "turbo run dev --scope=\"@calcom/docs\"", diff --git a/packages/prisma/package.json b/packages/prisma/package.json index 869bb56dac..d63d08147e 100644 --- a/packages/prisma/package.json +++ b/packages/prisma/package.json @@ -11,6 +11,7 @@ "db-reset": "run-s db-nuke db-setup", "db-seed": "yarn prisma db seed", "db-setup": "run-s db-up db-deploy db-seed", + "db-studio": "yarn prisma studio", "db-up": "docker-compose up -d", "deploy": "run-s build db-deploy", "dx": "yarn db-setup",