schema-tool icon indicating copy to clipboard operation
schema-tool copied to clipboard

History State Tracking

Open JohnMurray opened this issue 10 years ago • 0 comments

The tool provides linearity in the alter chain and history tracking in the DB but there is one thing the tool does not currently track and that is changes to existing files. If the tool is to enforce linearity as a way of ensuring proper execution on any environment (existing or new) then we must also know when files change once they have already been run.

This is a bit of an open question but the general ideas are:

  • we know when alters are run
  • we know in what order alters are run

We could also take a hash of the file-contents and insert that into the history table. We could then check that nothing has changed when running alters against various environment (warnings? errors?). If we integrate this into the check command then we add it to the up, down, and rebuild commands for free.

JohnMurray avatar Jun 04 '14 01:06 JohnMurray