[GSoC] migration

Rainer Müller raimue at macports.org
Mon Jun 12 08:05:41 UTC 2017

On 2017-06-11 19:07, Bradley Giesbrecht wrote:
>> 4. Another thing that ran my mind while pondering that there are 2 options for sqlite database as well: make the tables in the very beginning (while initial installation) or while running the snapshot for the first time. I suggest to go with the first one because it's simple.
>> The major target is to finish the snapshot action before Jun 24.
> Does “port selfupdate” constitute an “initial installation”?
> Does port currently perform schema checks?
> If port can detect if the schema needs updating then perhaps we can hook in and “do the right thing".

For testing it should be enough to just modify the registry.db locally
as you need it. Once you reach a stable schema, you will have to add
modifications to the registry schema at two places.

1) The initial database schema for new installations is defined here:


2) The metadata table in registry.db has a row with key='version', where
value holds the schema version. The code to update from one schema
version to the next is here:



More information about the macports-dev mailing list