[sync] fix(share): use status dot for table/view share state (T4669)#3221
[sync] fix(share): use status dot for table/view share state (T4669)#3221tea-artist wants to merge 1 commit into
Conversation
Synced from teableio/teable-ee@4196ec4 Co-authored-by: Aries X <caoxing9@gmail.com> Co-authored-by: Bieber <artist@teable.io> Co-authored-by: Boris <boris2code@outlook.com> Co-authored-by: Jocky-Teable <jocky@teable.ai> Co-authored-by: Jun Lu <hammond@teable.io> Co-authored-by: Pengap <penganpingprivte@gmail.com> Co-authored-by: Uno <uno@teable.ai> Co-authored-by: nichenqin <nichenqin@hotmail.com>
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7099d9d278
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -0,0 +1,34 @@ | |||
| import { createHash } from 'crypto'; | |||
|
|
|||
| const postgresIdentifierPattern = /^[a-z_]\w*$/i; | |||
There was a problem hiding this comment.
Restrict internal schema names to lowercase identifiers
The new validator accepts mixed-case schema names because of the /i flag, but runtime routing later injects search_path as an unquoted identifier. In PostgreSQL, unquoted identifiers are lowercased, so a user-provided schema like TeableMeta can be created as a quoted schema during migration yet queried as teablemeta at runtime, causing BYODB requests to hit the wrong schema or fail with missing-table errors. Enforce lowercase-only names here (or quote consistently everywhere search_path is set).
Useful? React with 👍 / 👎.
| export const withDataDbInternalSchemaParam = (url: string, internalSchema: string) => { | ||
| const parsed = new URL(url); | ||
| parsed.searchParams.set('schema', internalSchema); | ||
| parsed.searchParams.set('options', `-c search_path=${internalSchema}`); |
There was a problem hiding this comment.
Preserve existing PostgreSQL options in BYODB URLs
This now overwrites any existing options query parameter in the user-supplied BYODB URL. If an instance relies on options for required session settings (for example extra -c flags), those settings are silently dropped once the internal schema is appended, which can change connection behavior or break connectivity. Merge with existing options instead of replacing it.
Useful? React with 👍 / 👎.
🧹 Preview Environment Cleanup
|
🔄 Automated sync from EE repository.
51 commit(s) synced since last sync.
Authors
Included commits
Latest source commit: teableio/teable-ee@4196ec4
This PR was automatically created by the sync workflow.