query to update uploaded files

This commit is contained in:
Brandon Thomas committed 2024-08-28 01:25:28 -04:00
1 parent 90e54650bc
commit d2bb9d538d
1 file changed
+14
@@ -0,0 +1,14 @@
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
UPDATE media_files
SET is_user_upload = TRUE
WHERE origin_category IN ('upload', 'device_api')
AND is_user_upload = FALSE
LIMIT 10000;
SELECT COUNT(*)
FROM media_files
WHERE origin_category IN ('upload', 'device_api')
AND is_user_upload = FALSE;