chore(repositories): Mark project_repository column as not null.#115524
Open
wedamija wants to merge 5 commits into
Open
chore(repositories): Mark project_repository column as not null.#115524wedamija wants to merge 5 commits into
project_repository column as not null.#115524wedamija wants to merge 5 commits into
Conversation
`SeerProjectRepository.project_repository` and `RepositoryProjectPathConfig.project_repository` have been backfilled and verified to be not null. Updating the schema to reflect this. https://redash.getsentry.net/queries/11200/source
JoshFerge
approved these changes
May 13, 2026
Contributor
|
This PR has a migration; here is the generated SQL for for --
-- Alter field project_repository on repositoryprojectpathconfig
--
SET CONSTRAINTS "sentry_repositorypro_project_repository_i_3e830ad9_fk_sentry_pr" IMMEDIATE; ALTER TABLE "sentry_repositoryprojectpathconfig" DROP CONSTRAINT "sentry_repositorypro_project_repository_i_3e830ad9_fk_sentry_pr";
ALTER TABLE "sentry_repositoryprojectpathconfig" ADD CONSTRAINT "sentry_repositorypro_project_repository_i_3e830ad9_fk_sentry_pr" FOREIGN KEY ("project_repository_id") REFERENCES "sentry_projectrepository" ("id") DEFERRABLE INITIALLY DEFERRED NOT VALID;
ALTER TABLE "sentry_repositoryprojectpathconfig" VALIDATE CONSTRAINT "sentry_repositorypro_project_repository_i_3e830ad9_fk_sentry_pr";
ALTER TABLE "sentry_repositoryprojectpathconfig" ADD CONSTRAINT "sentry_repositoryproje_project_repository_id_3e830ad9_notnull" CHECK ("project_repository_id" IS NOT NULL) NOT VALID;
ALTER TABLE "sentry_repositoryprojectpathconfig" VALIDATE CONSTRAINT "sentry_repositoryproje_project_repository_id_3e830ad9_notnull";
ALTER TABLE "sentry_repositoryprojectpathconfig" ALTER COLUMN "project_repository_id" SET NOT NULL;
ALTER TABLE "sentry_repositoryprojectpathconfig" DROP CONSTRAINT "sentry_repositoryproje_project_repository_id_3e830ad9_notnull";for --
-- Alter field project_repository on seerprojectrepository
--
SET CONSTRAINTS "seer_projectreposito_project_repository_i_bff6d0fe_fk_sentry_pr" IMMEDIATE; ALTER TABLE "seer_projectrepository" DROP CONSTRAINT "seer_projectreposito_project_repository_i_bff6d0fe_fk_sentry_pr";
ALTER TABLE "seer_projectrepository" ADD CONSTRAINT "seer_projectreposito_project_repository_i_bff6d0fe_fk_sentry_pr" FOREIGN KEY ("project_repository_id") REFERENCES "sentry_projectrepository" ("id") DEFERRABLE INITIALLY DEFERRED NOT VALID;
ALTER TABLE "seer_projectrepository" VALIDATE CONSTRAINT "seer_projectreposito_project_repository_i_bff6d0fe_fk_sentry_pr";
ALTER TABLE "seer_projectrepository" ADD CONSTRAINT "seer_projectrepository_project_repository_id_bff6d0fe_notnull" CHECK ("project_repository_id" IS NOT NULL) NOT VALID;
ALTER TABLE "seer_projectrepository" VALIDATE CONSTRAINT "seer_projectrepository_project_repository_id_bff6d0fe_notnull";
ALTER TABLE "seer_projectrepository" ALTER COLUMN "project_repository_id" SET NOT NULL;
ALTER TABLE "seer_projectrepository" DROP CONSTRAINT "seer_projectrepository_project_repository_id_bff6d0fe_notnull"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SeerProjectRepository.project_repositoryandRepositoryProjectPathConfig.project_repositoryhave been backfilled and verified to be not null. Updating the schema to reflect this.https://redash.getsentry.net/queries/11200/source