Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-16191

Stop relying on Hibernate hbm2ddl for migrations

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Duplicate
    • Major
    • None
    • 10.11.3
    • Old Core
    • None
    • Unknown

    Description

      hbm2ddl is was automatically add missing tables/column for us before the migrations but it has drawbacks:

      • even if we have been lucky so far with the very simple modification we made Hibernate highly recommend to not use it in production because it cannot really be perfect
      • the fact that it's fully executed before starting the custom migration makes maintaining them a bit more complex since they are not executed with the expected shema of a specific version of XWiki but with the half migrated current shema

      Instead we should maintain Liquibase patch.

      On difficulty is that fully getting rid of hbm2ddl would mean going back in time and find out all the needed patches for each and every modification made to the hibernate shema in all previous versions.

      Since we have been lucky with hbm2ddl so far one possibility is to apply hbm2ddl for some fixed schema only and put all following modifications in Liquibase patches in migrations.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              tmortagne Thomas Mortagne
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: