I have couple of questions:
- is it possible to achieve this goal by the proposed plan?
- if it is possible, do I need to make changes in some other parts (lib/form or lib/routing /apps/qubit/modules/repository)?
- is there some other better, cleaner or simpler way to realize this goal?
Changing the repository table may bring your application to a state where it's hard to keep your own customized version of AtoM up to date because there is a lack of tooling in order to support local schema changes - our sql-upgrade task is a bit too rudimentary if you compare it with other more advanced tools out there. Assuming that you don't want to stop pulling new upgrades from the AtoM public project in the future, I'd suggest to do data model changes that are less invasive, e.g. instead of modifying the stock repository table you could create an additional repository_whatever table (1:1) with the extra fields that you need. The plugin infrastructure lets you define additional schema.yml files. See qbAclPlugin as an example.
You may want to take a look at sfRadPlugin too, where we took a different approach. Instead of creating a new table we added fields in QubitProperty (propery table), which is basically a key/value store. Inside the plugin there is also a sfRadPlugin class that wraps a QubitInformationObject with the additional fields. The wrapper provides a magic getter/setter that maps its properties to its respective tuples in the property table of the database. I'm not sure if that sounds scary but it's actually pretty easy to manage. Take a look at the sfRadPlugin class:https://github.com/artefactual/atom/blob/qa/2.2.x/plugins/sfRadPlugin/lib/sfRadPlugin.class.php.Let us know if you have more questions. If you open source your project we'll be able to provide better help.
--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at http://groups.google.com/group/ica-atom-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/a3346f3b-e43c-4fa2-b6db-cac022053f63%40googlegroups.com.