Skip to content

Commit 60b9692

Browse files
authored
ENG-794 - Added a new script "check-schema" to replace old check-types (#382)
* - Added a new script "check-schema" to replace old check-types - Updated README.md to reflect the new "check-schema" command, * rm formatting * Update "check-schema" script in package.json to use tsx for linting instead of npm run lint, improving consistency in script execution.
1 parent 2332684 commit 60b9692

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/database/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ We follow the Supabase [Declarative Database Schema](https://supabase.com/docs/g
2626
1. Assuming you're working on a feature branch.
2727
2. Make changes to the schema, by editing files in `packages/database/supabase/schemas`
2828
3. If you created a new schema file, make sure to add it to `[db.migrations] schema_paths` in `packages/database/supabase/config.toml`. Schema files are applied in that order, you may need to be strategic in placing your file.
29-
4. `turbo check-types`, which will do the following:
29+
4. `turbo check-schema`, which will do the following:
3030
1. Check your logic with `sqruff lint supabase/schemas`
3131
1. If there are errors there, you can fix them with `npm run lint:fix`
3232
2. Stop Supabase.

packages/database/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"dev": "supabase start && tsx scripts/createEnv.ts && supabase functions serve",
1616
"stop": "supabase stop",
1717
"check-types": "tsc --noEmit --skipLibCheck",
18+
"check-schema": "tsx scripts/lint.ts && supabase stop && npm run dbdiff",
1819
"lint": "eslint . && tsx scripts/lint.ts",
1920
"lint:fix": "tsx scripts/lint.ts -f",
2021
"build": "tsx scripts/build.ts && npm run genenv -- local",

0 commit comments

Comments
 (0)