The schema initialization was trying to create an index on the external_ref column before the migration that adds the column runs. This caused 'no such column: external_ref' errors when opening very old databases (pre-0.17.5). Solution: Move the index creation into the migration that adds the column. Fixes #284 Amp-Thread-ID: https://ampcode.com/threads/T-2744d5a7-168f-4ef6-bcab-926db846de20 Co-authored-by: Amp <amp@ampcode.com>