Remove ancient FDPMetadata reference from FactoryDefaults and mongodb - #975
Remove ancient FDPMetadata reference from FactoryDefaults and mongodb#975dennisvang wants to merge 2 commits into
Conversation
|
The Finally, c37890f (2020 Apr 4) removed all imports from Nevertheless, 0901ba4 (2020 Apr 17) updated the In fact, looking at migration 0002 introduced in c37890f, the actual class name should be However, if we start the latest version of the FDP from a clean slate (empty databases), we end up with the As it turns out, this is due to the fact that the ACL documents are created in the RDF triple-store migration 0001, which only runs after all mongodb migrations have completed. Moreover, the content of RDF triple-store-migration 0001 depends on application code from This is not how migrations are supposed to work: The migration content is supposed to be immutable, so the factory default should be defined in the migration itself, instead of depending on the actual app code, which may change at any time in the future. If anything, the reset-to-factory-defaults functionality should depend on the immutable migration content, not the other way around. In addition, the coupling between the mongo migrations and the triple-store migrations is problematic. I wonder: Perhaps the triple-store migrations should not be migrations at all, but just fixtures that are applied without keeping track of their history? In that case we could simply implement them in the app reset code only, and apply them directly at app start if we notice that the triple store is empty... |
replaced non-existent FDPMetadata class by Metadata, matching the class name from migration 0002 (and 0021)
todo:
classNameand fix theFactoryDefaultsaccordingly -> Changed toMetadatafollowing mongodb migration 0002FactoryDefaultsare applied. This is because RDF triple-store migration 0001 usesFactoryDefaultsfrom the app code, making it immutable, and because the RDF migrations only run after all mongodb migrations have finished.