[GSoC] migration

Umesh Singla umeshksingla at macports.org
Wed Jun 14 03:48:21 UTC 2017


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:
> https://github.com/macports/macports-base/blob/
> e3a0dc2ebde62a9c5feac6a1edee1708a95bb02a/src/cregistry/sql.c#L122-L131
> 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:
> https://github.com/macports/macports-base/blob/
> e3a0dc2ebde62a9c5feac6a1edee1708a95bb02a/src/cregistry/sql.c#L231-L240

Thanks Rainer for this. This is really useful. I had doubts on how often
cregistry/sql.c file gets updated or whether this is the one. The name
sql.c seems to be so OS core file. So, I can just add the new tables here?

Also, new tables means adding them in update_db() too, just like it is the
case with existing port or portgroup tables?

Forgive me for asking almost everything.

Umesh Singla
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20170614/9cca947e/attachment.html>

More information about the macports-dev mailing list