The id column is actually used: something in the bulk import requires that the primary key column be in the custom select

main
Vyr Cossont 2 years ago
parent ac891d9dce
commit 9474bb27fc

@ -96,13 +96,11 @@ class Importer::StatusesIndexImporter < Importer::BaseImporter
Status.local.select('"statuses"."id", COALESCE("statuses"."reblog_of_id", "statuses"."id") AS status_id')
end
# The `id` field in the above queries isn't used anywhere, so we leave it out of these.
def public_scope
Status.with_public_visibility.select('"statuses"."id" AS status_id')
Status.with_public_visibility.select('"statuses"."id", "statuses"."id" AS status_id')
end
def public_or_unlisted_scope
Status.with_public_or_unlisted_visibility.select('"statuses"."id" AS status_id')
Status.with_public_or_unlisted_visibility.select('"statuses"."id", "statuses"."id" AS status_id')
end
end

Loading…
Cancel
Save