Uploaded image for project: 'Grouper'
  1. Grouper
  2. GRP-132

improve the way ddl and database upgrades work



    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.0
    • 1.4.0
    • API
    • None


      GrouperLoader has this working, and it works fine. I think we should move it into the API.

      Instead of generating DDL form hibernate via the mapping files (with some external objects via ddl utils), we do everything with ddl utils. Basically we have a table which keeps track of which DB version we are on (including managing plugins). At startup we query the table to make sure the DB is the same version as the API. If not the same version, then log the DDL to run, and continue (which will probably cause an error further on), or we could just exit. Auto-running the DDL without looking at it is not a good idea... The DDL is maintained in Java, and it would give you the DDL which is a diff of how to get from where we are to where we want to go. This could also include SQL changes as well. DDL-utils doesnt always give optimal results, so it is possible to include a DB-specific script to override a certain ddlutils action...

      The bottom line is we have more flexibility by being able to mix DDL and SQL, we can easily generate a diff of upgrade script, we can easily put in DB specific scripts, and we can easily tell if a DB is up to date...




            chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
            chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
            0 Vote for this issue
            0 Start watching this issue



              Smart Checklist