Drop snapshot schema#1166
Open
SachaProbo wants to merge 1 commit into
Open
Conversation
1182c67 to
0ffe994
Compare
cb7e4bb to
cc6b38e
Compare
0ffe994 to
95c4923
Compare
Drops the now-unused snapshot_id/source_id columns from every table that carried them, the snapshots and controls_snapshots tables, the snapshots_type enum, and the snapshot-scoped indexes. Recreates the unique indexes that previously gated on snapshot_id IS NULL without the snapshot scope. The data was already cleaned up in the prior PR. Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
cc6b38e to
89032df
Compare
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.
Drops the now-unused snapshot_id/source_id columns from every table that carried them, the snapshots and controls_snapshots tables, the snapshots_type enum, and the snapshot-scoped indexes. Recreates the unique indexes that previously gated on snapshot_id IS NULL without the snapshot scope. The data was already cleaned up in the prior PR.
Summary by cubic
Drop the snapshot schema and scope across the DB, and update error handling to match the new unique index names. Removes all
snapshot_id/source_idcolumns, deletes snapshot tables/enum, and recreates unique indexes without snapshot gating.Migration
snapshot_id/source_idacross affected tables; remove snapshot-scoped indexes (states_of_applicability_source_id_snapshot_id_uniq,states_of_applicability_name_organization_id_uniq,idx_findings_organization_snapshot, etc.); dropsnapshots,controls_snapshots, andsnapshots_type.statements_of_applicability_name_organization_id_uniqidx_findings_org_reference_idprocessing_activity_dpias_processing_activity_id_uniqprocessing_activity_tias_processing_activity_id_uniqRefactors
pkg/coredata/data_protection_impact_assessment.goandpkg/coredata/transfer_impact_assessment.goto the new unique index names.Written for commit 89032df. Summary will update on new commits.