-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 How to implement this would go like this:
- - Detect the change with nao:lastModified and the existing introspection ontology (tooling for this is available because of the existing support) - - Store the pending change (tooling available) - - Make the new table for the multi-value property - - SELECT the column out of the class's table and INSERT the values into the new table - - Change the introspection ontology - - DROP the column out of the class's table. I think SQLite doesn't support this so you will have to recreate the table. There is tooling available for this. (recreate as tablename_tmp with the new column, select into from the old to the tablename_tmp, leaving out the old column, drop tablename, rename tablename_tmp to tablename). - - Remove the pending change As original developer of the ontology change coping I can tell you that this is not an easy piece of work. I can of course assist whoever wants to try this. But without it I think we should revert the cardinality change for nfo:hasMediaStream. Perhaps add a nfo:hasStream or nfo:hasMultiMediaStream property or something instead and mark the old nfo:hasMediaStream as deprecated? Reason to revert is loss of data to people who are not using the journal (most and/or everyone of the embedded users) and having to rebuild the entire meta.db using the journal for everybody else. Latter is not the worst thing in the world, former is bad. Evil. Wrong. Note that the disable-journal feature exists for privacy reasons too: Without it deleting triples will just mean adding a delete command to the journal. The original data remains in the journal. That also means that all data ever accumulated can be read from the journal. Also data that once got deleted. This is not acceptable for everybody, and they therefore should disable the journal. Another reason to disable the journal is a serious performance improvement, a lot less I/O usage, and a lot less disk space usage. So removing the disable-journal option is ... not an option (and the feature is being used by the N9, Jolla and a few other users. I think Pelagicore too for example -- or they should be). Kind regards, Philip On 8/08/2014 10:38, Philip Van Hoof wrote: > Martyn, > > You have to be more careful about ontology changes: > > https://git.gnome.org/browse/tracker/commit/?id=6b2dff6e18bd9a9d4238557b2dce2565fea49491 > > Maxcardinality changes are not supported by our ontology change > coping mechanism: > > https://wiki.gnome.org/Projects/Tracker/Documentation/SupportedOntologyChanges > > This works when the journal is used from 1 to N, but it doesn't > work when you disable the journal. > > We could implement 1 to N with a disabled journal, but right now > this isn't implemented yet in that case. > > With enabled journal it will work because we just replay the > journal over the new situation. One element will or can be seen and > that just works in a cardinality N case, of course (and that's why > it works). > > I think you should mention this nfo:hasMediaStream cardinality > change in the release notes and I think you should increment the > major version numbering when making API changes like this (or > implement the cardinality upgrading from 1 to N in the > disabled-journal case). > > Kind regards, > > Philip _______________________________________________ tracker-list > mailing list tracker-list@gnome.org > https://mail.gnome.org/mailman/listinfo/tracker-list > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (MingW32) iQEcBAEBAgAGBQJT5J6HAAoJEEP2NSGEz4aDuJgIAIKhLxJxjCZ+knmGV89AmLkJ LCcpelLeYl8SwLWIHjlyCywPLw6S8kUZZvRoxDg++Zp4qtX98exMJ4/KwTExTkSA v+QpBxd2R7F+u0VixoMBEotLqtF7z0B7PTKYhwZ9ZvC6NzeAmLGebAFrfonj0PC6 RqGWpJkBRw2c70NgcJpOs+WJlcf10Nl4V1TzY1AQk+rx/nqinkcEZ/Niy6Weix91 Wsv1W7t0Jj+MFvpXugnmfb9FgIBGXEsfPBGuS2XeytapVLZ3mGAYS4HyehzOXqZk 9f5BEsPZAbZ5jg8fW8zvna3NiQW6VaScU7kQ3onVHzluZ2KgzwbadssmRBYx+G0= =b08V -----END PGP SIGNATURE----- _______________________________________________ tracker-list mailing list tracker-list@gnome.org https://mail.gnome.org/mailman/listinfo/tracker-list