Jump to content

Track changes to templates and fields


eydun
 Share

Recommended Posts

Making automatic migrations is not possible. That's because migrations need to know the order of several actions (first this, then that, then that). For example you can only assign a field to a template once the template exists. 

Link to comment
Share on other sites

Making automatic migrations is not possible.

I imagine that some kind of combined solution between automatic and manual would be optimal. That is, if there is a local changelog, then the user can select an entry in the changelog to create an migration-file for that change (e.g. new field that has been created).

I saw that there was a code-generator component in Nette ?

Link to comment
Share on other sites

Just create a module and a script that saves all this information to a file:

GHHieSn.png

This data could easily be saved as JSON. Maybe there are already methods that do this (I think so, because using the GUI a JSON is written into a textarea. Just look there how it is created). Of course you don't want to run this on every page request. I don't know what the best hook would be. A simple solution would be to run on every Modules::refresh()

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...