Registry schema cleanup

Rainer Müller raimue at macports.org
Thu Nov 20 04:46:54 PST 2014


On 2014-11-18 20:48, Clemens Lang wrote:
> From the files table, I'd remove `mtime', `md5sum' and `editable', which
> are all unused and set to dummy values at the moment. I know those were
> intended to be used in configuration management, but this hasn't
> happened so far and we can always re-add the fields later, if we ever
> finish implementing this.

These fields have been used in the gsoc10-configfiles branch. There is
certainly enough to cleanup on that branch by now. I guess introducing
these fields again with another registry upgrade would probably be the
smaller effort.

On a side note, using something more generic like 'checksum' as field
name with a value of 'md5:abc012...' or 'sha256:def345...' would be more
flexible as a the schema. Either CHAR or VARCHAR are all just TEXT
ignoring the length for SQLite, right? However, that part only needs to
be discussed by whoever wants to pick up the work on that branch.

> In the dependencies table, we should add a `dep_port` index on the `id'
> column to improve join performance.
> 
> We currently do not have any indices for the portgroups table. We should
> add an index on the `id' column for joins and one over (id, name,
> version, size, sha256) to speed up opening portgroups and executing
> Portfiles from registry.
> 
> Of course, these changes imply the corresponding changes in registry2.0
> and cregistry.
> 
> If nobody objects to the changes, I have a patch ready to commit.

Sounds fine, please go ahead.

Just to be clear: once this lands on trunk, anyone installing from trunk
should be aware that their installation will not be compatible with the
released version anymore.

Rainer


More information about the macports-dev mailing list