Skip to content

Commit

Permalink
Update database/migrations/000050_artifact_projects.up.sql
Browse files Browse the repository at this point in the history
Co-authored-by: Jakub Hrozek <jakub@stacklok.com>
  • Loading branch information
JAORMX and jhrozek committed Apr 10, 2024
1 parent 196cf10 commit dc3b21c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion database/migrations/000050_artifact_projects.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ ALTER TABLE artifacts ALTER COLUMN provider_id SET NOT NULL;
ALTER TABLE artifacts ALTER COLUMN provider_name SET NOT NULL;

-- Now that repository_id's are nullable, let's index artifacts by repository_id where the repository_id is not null
CREATE INDEX artifacts_repository_id_idx ON artifacts (repository_id) WHERE repository_id IS NOT NULL;
CREATE UNIQUE INDEX artifacts_repository_id_idx ON artifacts (repository_id) WHERE repository_id IS NOT NULL;

COMMIT;

Expand Down

0 comments on commit dc3b21c

Please sign in to comment.