0

After running 'generateChangelog' on an Oracle database, the changelogFile has wrong type (or even better, simply bad value) for some fields, independently of the used driver. More closer, some of the RAW columns are translated to STRING (it sounds okay), but values like "E01005C6842100020200000E10000000" are translated to "[B@433defed". Which seems to be some blob like entity. Also, these are the only data related differences between the original database content and backup. When I try to restore the DB by 'update', these columns show problems "Unexpected error running Liquibase: *****: invalid hex number".

Is there any way forcing liquibase to save the problem columns "as-is", or anything else to overcome this situation? Or is it a bug?

Community
  • 1
  • 1
hurjup
  • 23
  • 5

1 Answers1

0

I think more information is needed to be able to diagnose this. Ideally, if you suspect something may be a bug, you provide three things:

  1. what steps you took (this would include the versions of things being used, relevant configuration, commands issued, etc.)

  2. what the actual results were

  3. what the expected results were

Right now we have some idea of 1 (ran generateChangelog on Oracle, then tried to run update) but we are missing things like what the structure of the Oracle database was, what version of Oracle/Liquibase, and what was the actual command issued. We have some idea of the actual results (columns that are of type RAW in Oracle are converted to STRING in the changelog, and it may be also converting the data in those columns to different values than you expect) and some idea of the expected results (you expected the RAW data to be saved in the changelog and then be able to re-deploy that change).

That being said, using Liquibase to back up and restore a database (especially one that has columns of type RAW/CLOB/BLOB) is probably not a good idea.

Liquibase is primarily aimed at helping manage change to the structure of a database and not so much with the data contained within it.

SteveDonie
  • 8,700
  • 3
  • 43
  • 43