From aafe225ac9ffc119cc584d18954e4d11f6225d5b Mon Sep 17 00:00:00 2001 From: dal Date: Thu, 1 May 2025 08:31:19 -0600 Subject: [PATCH] enum wrong --- .../up.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/migrations/2025-04-29-223656_add_data_source_id_to_metric_files/up.sql b/api/migrations/2025-04-29-223656_add_data_source_id_to_metric_files/up.sql index 87d7332c4..18ea6ef96 100644 --- a/api/migrations/2025-04-29-223656_add_data_source_id_to_metric_files/up.sql +++ b/api/migrations/2025-04-29-223656_add_data_source_id_to_metric_files/up.sql @@ -30,11 +30,11 @@ SELECT id FROM metric_files WHERE data_source_id IS NULL; -- 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 asset_permissions 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 = 'MetricFile'; -DELETE FROM user_favorites 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 = 'metric_file'; +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 FROM metric_files