Remove deprecated snapshot system
The register/document model has fully replaced the snapshot system. Delete every snapshot-scoped row and strip the application code that referenced them: SnapshotID/SourceID struct fields, snapshot_id IS NULL filters, snapshot columns from SELECT/INSERT statements and named args, and the eight migrate-*-snapshots-to-documents one-shot tools. The remaining snapshot_id / source_id columns, the snapshots and controls_snapshots tables, the snapshots_type enum, and the snapshot-scoped indexes are now unused; they are dropped in a follow-up schema migration so this change can roll back cleanly without leaving orphaned data. Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -189,7 +189,6 @@ FROM
|
||||
WHERE
|
||||
%s
|
||||
AND third_party_id = @third_party_id
|
||||
AND snapshot_id IS NULL
|
||||
ORDER BY
|
||||
created_at DESC
|
||||
LIMIT 1;
|
||||
@@ -240,7 +239,6 @@ FROM
|
||||
WHERE
|
||||
%s
|
||||
AND third_party_id = @third_party_id
|
||||
AND snapshot_id IS NULL
|
||||
AND %s
|
||||
`
|
||||
|
||||
@@ -292,7 +290,6 @@ FROM
|
||||
WHERE
|
||||
%s
|
||||
AND third_party_id = ANY(@third_party_ids)
|
||||
AND snapshot_id IS NULL
|
||||
ORDER BY
|
||||
third_party_id, created_at DESC
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user