Skip to content

chore: Enforce workspace proxy unique name case insensitive #7202

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 3 commits into from
Apr 20, 2023

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Apr 19, 2023

I need the PR #7176 merged to write the unit tests 😢. It has the http endpoints to test.

DROP INDEX IF EXISTS workspace_proxies_lower_name_idx;

-- Enforces no active proxies have the same name.
CREATE UNIQUE INDEX ON workspace_proxies (name) WHERE deleted = FALSE;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't it be CREATE UNIQUE INDEX workspace_proxies_name_idx ON workspace_proxies USING btree (name) WHERE deleted = FALSE;?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nop, I copied the previous migration that added the index:

-- Enforces no active proxies have the same name.
CREATE UNIQUE INDEX ON workspace_proxies (name) WHERE deleted = FALSE;

Forgot to use a btree there, so kept it as it was for the Down.

@Emyrk Emyrk merged commit 7fa1112 into main Apr 20, 2023
@Emyrk Emyrk deleted the stevenmasley/proxy_name_lower branch April 20, 2023 16:30
@github-actions github-actions bot locked and limited conversation to collaborators Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants