-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove Snyk tables from frequency table
- Loading branch information
Showing
1 changed file
with
15 additions
and
9 deletions.
There are no files selected for viewing
24 changes: 15 additions & 9 deletions
24
packages/common/prisma/migrations/20250218105625_remove_snyk_tables/migration.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
-- DropTable | ||
DROP TABLE IF EXISTS "snyk_issues"; | ||
BEGIN; | ||
|
||
-- DropTable | ||
DROP TABLE IF EXISTS "snyk_projects"; | ||
-- Remove the frequency data for deprecated Snyk tables else alarms will trip | ||
DELETE FROM cloudquery_table_frequency | ||
WHERE table_name IN ( | ||
'snyk_issues' | ||
, 'snyk_projects' | ||
, 'snyk_sbom' | ||
, 'snyk_organizations' | ||
); | ||
|
||
-- DropTable | ||
DROP TABLE IF EXISTS "snyk_sbom"; | ||
-- Remove deprecated Snyk tables | ||
DROP TABLE IF EXISTS 'snyk_issues'; | ||
DROP TABLE IF EXISTS 'snyk_projects'; | ||
DROP TABLE IF EXISTS 'snyk_sbom'; | ||
DROP TABLE IF EXISTS 'snyk_organizations'; | ||
|
||
-- DropTable | ||
DROP TABLE IF EXISTS "snyk_organizations"; | ||
|
||
COMMIT; |