Introduce aliases#13
Conversation
Signed-off-by: dusan <borovcanindusan1@gmail.com>
|
@codex Review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 14232be8b1
ℹ️ 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".
|
|
||
| ALTER TABLE tenants | ||
| ADD CONSTRAINT chk_tenants_alias_slug | ||
| CHECK (alias IS NULL OR alias ~ '^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$'); |
There was a problem hiding this comment.
Reject UUID-shaped aliases in the DB constraint
This database-side validator still accepts UUID-shaped strings such as 465358f9-07f4-4ea0-8cbb-2abc654442bd, because they match the slug regex, while validate_alias() rejects them to keep alias and UUID addressing from colliding. On an upgrade where a legacy tenant route is UUID-shaped, or on any direct SQL/import path, the migration will preserve/accept an alias that the API would reject; add the UUID-shaped exclusion to the migration check and the table constraints.
Useful? React with 👍 / 👎.
Signed-off-by: dusan <borovcanindusan1@gmail.com>
Signed-off-by: dusan <borovcanindusan1@gmail.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
What type of PR is this?
This is a feature PR.
What does this do?
This pull request adds a concept of alias - user-friendly replacement for UUID.
Which issue(s) does this PR fix/relate to?
There is no such issue.
Have you included tests for your changes?
Yes.
Did you document any new/modified features?
Yes.
Notes
N/A