mirror of https://github.com/buster-so/buster.git
enum wrong
This commit is contained in:
parent
843911eca1
commit
aafe225ac9
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue