ravinarayansingh commented on PR #7604: URL: https://github.com/apache/nifi/pull/7604#issuecomment-1688954316
> > > Thanks for the contribution @ravinarayansingh. > > > On initial review, supporting this feature raises some concerns. The created and modified timestamps are intended to reflect what actually occurred. With this optional flag, however, there is no indication that the timestamps do not reflect when a flow was actually created or modified. For this reason, supporting this option seems like it could raise potential usability and tracking issues. > > > Do you have any additional background for the motivation behind this change? > > > > > > Hi @exceptionfactory > > I'm looking to upgrade a NiFi Registry that currently uses h2 and the Filesystem as a persistence provider. My goal is to enhance the registry by migrating to Postgres as the provider. During this transition, I need to ensure that the flows from the old registry are transferred to the new one while retaining their original authors and timestamps. > > The issue I've encountered is that the current behavior of the "create flow version" API only preserves the author information but not the timestamp. As a solution, I've submitted a pull request (PR) that addresses this concern. > > Thanks > > Thanks for the additional background @ravinarayansingh, that is very helpful. > > In that scenario, the best approach would be to export the information from H2 and import it to PostgreSQL. The [H2 Tutorial](http://www.h2database.com/html/tutorial.html) provides some basic guidance on loading a H2 file, which could then be used for exporting. There will be some differences between H2 and PostgreSQL syntax, but this would be a better way to handle such a migration. > > The create flow REST methods are not necessarily intended for bulk migration, so from that perspective, introducing this new parameter does not seem like the best solution. As we know create bucket , create flow version both API's already have _preserveSourceProperties_ parameter and for this create Flow i have added . While I acknowledge that the current approach might not be optimal, I'm curious about the initial rationale for including this parameter. Additionally, could you clarify the reasoning behind exclusively maintaining the author's information? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
