Drop snapshot schema
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>
This commit is contained in:
@@ -479,7 +479,7 @@ INSERT INTO processing_activity_data_protection_impact_assessments (
|
||||
_, err := conn.Exec(ctx, q, args)
|
||||
if err != nil {
|
||||
if pgErr, ok := errors.AsType[*pgconn.PgError](err); ok {
|
||||
if pgErr.Code == "23505" && pgErr.ConstraintName == "processing_activity_dpias_processing_activity_id_snapshot_id_uniq" {
|
||||
if pgErr.Code == "23505" && pgErr.ConstraintName == "processing_activity_dpias_processing_activity_id_uniq" {
|
||||
return ErrResourceAlreadyExists
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user