enum wrong

This commit is contained in:
dal 2025-05-01 08:31:19 -06:00
parent 843911eca1
commit aafe225ac9
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
1 changed files with 4 additions and 4 deletions

View File

@ -30,11 +30,11 @@ SELECT id FROM metric_files
WHERE data_source_id IS NULL; WHERE data_source_id IS NULL;
-- Clean up related tables before deleting the metric_files -- Clean up related tables before deleting the metric_files
-- NOTE: Assumes the AssetTypeEnum value for metric files is 'MetricFile'. Verify this. -- NOTE: Assumes the AssetTypeEnum value for metric files is 'metric_file'. Verify this.
DELETE FROM metric_files_to_dashboard_files WHERE metric_file_id IN (SELECT id FROM metric_files_to_delete); DELETE FROM metric_files_to_dashboard_files WHERE metric_file_id IN (SELECT id FROM metric_files_to_delete);
DELETE FROM asset_permissions WHERE asset_id IN (SELECT id FROM metric_files_to_delete) AND asset_type = 'MetricFile'; DELETE FROM asset_permissions WHERE asset_id IN (SELECT id FROM metric_files_to_delete) AND asset_type = 'metric_file';
DELETE FROM collections_to_assets WHERE asset_id IN (SELECT id FROM metric_files_to_delete) AND asset_type = 'MetricFile'; DELETE FROM collections_to_assets WHERE asset_id IN (SELECT id FROM metric_files_to_delete) AND asset_type = 'metric_file';
DELETE FROM user_favorites WHERE asset_id IN (SELECT id FROM metric_files_to_delete) AND asset_type = 'MetricFile'; DELETE FROM user_favorites WHERE asset_id IN (SELECT id FROM metric_files_to_delete) AND asset_type = 'metric_file';
-- Delete metric_files that couldn't be backfilled -- Delete metric_files that couldn't be backfilled
DELETE FROM metric_files DELETE FROM metric_files