firebirdlibreoffice-base

HSQLDB to Firebird migration subtracted one day from all date values in tables


Using Libreoffice Base and was prompted to migrate to Firebird from HSQLDB. I had read up about this bug and ensured I had a backup of the original database before proceeding with the migration. It seems the date bug was the only issue with the migration.

What is the easiest way to fix the values? I have hundreds of lines to correct in multiple tables. Is there any way to execute some sort of Date + 1 day script on the date columns and call it a day, or am I doomed to manually change each row one by one?


Solution

  • Yes, it is exactly as simple as you wrote. To be sure you can use function DATEADD instead of addition.

    update the_table set the_field = dateadd(1 day to the_field)