From 26a411ba27eb5f743e0386b4ab98bf3b12585343 Mon Sep 17 00:00:00 2001 From: evazion Date: Fri, 8 Oct 2021 21:10:27 -0500 Subject: [PATCH] favorites: include favorites in bigquery exports. Include the favorites table in the nightly database dumps in BigQuery. Previously we couldn't do this because we didn't have an index on the favorite ID, which we needed to iterate across the table efficiently. Note that this doesn't include private favorites. Note also that if a user switches their favorites from private to public, then their favorites will begin to appear in these dumps. --- app/logical/bigquery_export_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/logical/bigquery_export_service.rb b/app/logical/bigquery_export_service.rb index 23cb56351..4750d543f 100644 --- a/app/logical/bigquery_export_service.rb +++ b/app/logical/bigquery_export_service.rb @@ -39,7 +39,7 @@ class BigqueryExportService Rails.application.eager_load! models = ApplicationRecord.descendants.sort_by(&:name) - models -= [Favorite, IpAddress, TagRelationship, ArtistVersion, ArtistCommentaryVersion, NoteVersion, PoolVersion, PostVersion, WikiPageVersion] + models -= [IpAddress, TagRelationship, ArtistVersion, ArtistCommentaryVersion, NoteVersion, PoolVersion, PostVersion, WikiPageVersion] models end