-
Notifications
You must be signed in to change notification settings - Fork 513
"Require publishable client key" toggle #1158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
fe9264e
built-with app
N2D4 8412e23
Require publishable client key toggle
N2D4 1e4010c
Remove built-with folder
N2D4 14a624b
Clean-up pnpm-lock
N2D4 ba5f5dc
oauth
N2D4 2969cd7
remove oauth stuff
N2D4 2d5b12d
better oauth handling
N2D4 b2332b4
Improve stuff
N2D4 b050e77
Various fixes
N2D4 9ad8c1e
Merge remote-tracking branch 'origin/Dev' into built-with-oa
N2D4 86d7d5f
Fixes
N2D4 4415144
Fix migration
N2D4 8188740
Merge remote-tracking branch 'origin/dev' into built-with-oa
N2D4 0b30f8e
Fix types
N2D4 f6f0c13
Fix
N2D4 add0a1f
Various fixes
N2D4 a72bc97
Fixes
N2D4 73d4589
Merge branch 'dev' into built-with-oa
N2D4 79e439b
Merge branch 'dev' into built-with-oa
N2D4 9c2bf42
Forward compatibility script
N2D4 aff7c88
Fix backward-compat
N2D4 078c587
Merge remote-tracking branch 'origin/dev' into built-with-oa
N2D4 e9aadaf
Rename DB migration compatibility action
N2D4 5d06c08
Merge remote-tracking branch 'origin/dev' into built-with-oa
N2D4 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...end/prisma/migrations/20260216120000_project_require_publishable_client_key/migration.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| -- Create temporary expression index to speed up the migration | ||
| -- (B-tree on the specific JSONB path, not GIN on the whole column, | ||
| -- so the index is actually used by the #>> WHERE clause) | ||
| -- SPLIT_STATEMENT_SENTINEL | ||
| -- SINGLE_STATEMENT_SENTINEL | ||
| -- RUN_OUTSIDE_TRANSACTION_SENTINEL | ||
| CREATE INDEX CONCURRENTLY IF NOT EXISTS "temp_project_require_publishable_client_key_idx" | ||
| ON /* SCHEMA_NAME_SENTINEL */."Project" | ||
| USING GIN ("projectConfigOverride"); | ||
| -- SPLIT_STATEMENT_SENTINEL | ||
|
|
||
| -- Set requirePublishableClientKey to true for existing projects when missing | ||
| -- SPLIT_STATEMENT_SENTINEL | ||
| -- SINGLE_STATEMENT_SENTINEL | ||
| -- CONDITIONALLY_REPEAT_MIGRATION_SENTINEL | ||
| WITH to_update AS ( | ||
| SELECT "id" | ||
| FROM "Project" | ||
| WHERE "projectConfigOverride" IS NULL | ||
| OR NOT "projectConfigOverride" ? 'project.requirePublishableClientKey' | ||
| LIMIT 10000 | ||
| ) | ||
| UPDATE "Project" p | ||
| SET "projectConfigOverride" = jsonb_set( | ||
| COALESCE(p."projectConfigOverride", '{}'::jsonb), | ||
| '{project.requirePublishableClientKey}', | ||
| 'true'::jsonb, | ||
| true | ||
| ) | ||
| FROM to_update tu | ||
| WHERE p."id" = tu."id" | ||
|
N2D4 marked this conversation as resolved.
|
||
| RETURNING true AS should_repeat_migration; | ||
|
N2D4 marked this conversation as resolved.
|
||
| -- SPLIT_STATEMENT_SENTINEL | ||
|
|
||
| -- Clean up temporary index | ||
| DROP INDEX IF EXISTS "temp_project_require_publishable_client_key_idx"; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.