Detecting database migration

42 views
Skip to first unread message

Emiliano Heyns

unread,
Dec 31, 2025, 5:18:51 AM12/31/25
to zotero-dev
Is it possible for a plugin to detect that a database migration (eg for the apparently new native PMID/PMCID fields) is ongoing?

Emiliano Heyns

unread,
Dec 31, 2025, 8:20:13 AM12/31/25
to zotero-dev
Or perhaps specifically, not a database migration (for which the existing promises suffice) but the moving of data from the extra field to new native fields, which runs while the schema promise has cleared. 

On Wed, 31 Dec 2025, 11:18 'Emiliano Heyns' via zotero-dev, <zoter...@googlegroups.com> wrote:
Is it possible for a plugin to detect that a database migration (eg for the apparently new native PMID/PMCID fields) is ongoing?

--
You received this message because you are subscribed to a topic in the Google Groups "zotero-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/zotero-dev/9mkL4ov6xco/unsubscribe.
To unsubscribe from this group and all its topics, send an email to zotero-dev+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/zotero-dev/b73c20df-568f-4722-b166-177014a57d17n%40googlegroups.com.

Dan Stillman

unread,
Jan 2, 2026, 11:11:44 AMJan 2
to zoter...@googlegroups.com
When the schema is updated, it adds a row to the `settings` table, which you can detect with this:

await Zotero.DB.valueQueryAsync(
    "SELECT COUNT(*) FROM settings WHERE setting='globalSchema' AND key='migrateExtra'"
);

That will be 1 when there's a queued or in-process migration and 0 when there isn't.
Reply all
Reply to author
Forward
0 new messages