Skip to content
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

feat(api,cli,ui): disable project key #6429

Merged
merged 8 commits into from
Jan 25, 2023
Merged

Conversation

fsamin
Copy link
Member

@fsamin fsamin commented Jan 24, 2023

No description provided.

@fsamin fsamin changed the title feat(api,cli,ui) disable project key feat(api,cli,ui): disable project key Jan 24, 2023
engine/sql/api/263_key_disabled.sql Outdated Show resolved Hide resolved

-- +migrate Up
ALTER TABLE project_key ADD COLUMN disabled BOOLEAN NOT NULL DEFAULT FALSE;
UPDATE project_key SET disabled = false;
Copy link
Collaborator

Choose a reason for hiding this comment

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

DEFAULT false is not updating all existing rows ?

If there is lots of values the right pattern is:

ALTER TABLE project_key ADD COLUMN disabled BOOLEAN NOT NULL;
UPDATE project_key SET disabled = false;
ALTER TABLE "project_key" ALTER COLUMN disabled SET DEFAULT 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.

DEFAULT false is not updating all existing rows ?

nope

there are not so much rows (1468) in the table

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 7 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@yesnault yesnault merged commit 5399721 into master Jan 25, 2023
@richardlt richardlt deleted the feat_disable_project_key branch March 20, 2023 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants