From 9a0a3b64cd9255c7437ce5540dd9060d11c1e5ba Mon Sep 17 00:00:00 2001 From: Si Taggart Date: Wed, 4 Oct 2023 11:50:04 -0700 Subject: [PATCH] chore: pr feedback --- .github/workflows/on_merge_to_main_supabase.yml | 6 ++---- .github/workflows/on_pull_request_supabase.yml | 2 -- apps/backend/README.md | 6 ++++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/on_merge_to_main_supabase.yml b/.github/workflows/on_merge_to_main_supabase.yml index 3beff91324..5097615354 100644 --- a/.github/workflows/on_merge_to_main_supabase.yml +++ b/.github/workflows/on_merge_to_main_supabase.yml @@ -21,8 +21,6 @@ jobs: with: fetch-depth: 0 - - uses: nrwl/nx-set-shas@v3 - - name: Setup Node.js 20.5 uses: actions/setup-node@v3 with: @@ -58,5 +56,5 @@ jobs: with: version: latest - - run: supabase link --project-ref $SUPABASE_PROJECT_ID - - run: supabase db push + - run: yarn workspace @twilio-paste/backend supabase link --project-ref $SUPABASE_PROJECT_ID + - run: yarn workspace @twilio-paste/backend supabase db push diff --git a/.github/workflows/on_pull_request_supabase.yml b/.github/workflows/on_pull_request_supabase.yml index ef2993f472..dfe00ad2e9 100644 --- a/.github/workflows/on_pull_request_supabase.yml +++ b/.github/workflows/on_pull_request_supabase.yml @@ -14,8 +14,6 @@ jobs: with: fetch-depth: 0 - - uses: nrwl/nx-set-shas@v3 - - name: Setup Node.js 20.5 uses: actions/setup-node@v3 with: diff --git a/apps/backend/README.md b/apps/backend/README.md index fee8163c10..13ef71d609 100644 --- a/apps/backend/README.md +++ b/apps/backend/README.md @@ -6,13 +6,15 @@ Uses Supabase. You need docker running locally to start local dev. You only need Note: all scripts assume the backend directory is the current working directory. -Generating migrations when you've edited the DB in the console. +Generating migrations when you've edited the DB in the Supabase console. ``` yarn supabase db diff --use-migra name_of_migration -f name_of_migration ``` -Reset db after migration to test migration files +Reset db after migration to test migration files. Migration files are generated by the supabase db when you make changes and run the above command. + +https://supabase.com/docs/guides/cli/managing-environments?environment=production#create-a-new-migration ``` yarn supabase db reset