Search code examples
javahibernateaudithibernate-annotationsauditing

How to migrate Hibernate @Audited informarion from table field?


I need to change my database structure that way: move one field from @Audited entity to another @Audited entity with no loss of audit information. How can I migrate it?

  1. By liquibase migration I create new field in table T1 and T1_aud
  2. Update T1 with values of old table field T2
  3. Somehow migrate audit to T1
  4. Drop column from T2 and T2_aud

Solution

  • Just adding the same values to AUD table solves the problem.