documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Migration fixes

Open jimohalloran opened this issue 2 years ago • 0 comments

Two updates to the pgloader configuration that appears in the MySQL to Postgresql migration guide:

  • Add an extra typecast to ensure that signed int primary keys are converted correctly. Where unsigned units are used as the primary key (4 audit tables and a handful of other core Oro tables), they converted correctly into a bigint + sequence. But signed ints (the vast majority of tables) converted to ints with a primary key constraint and no sequence for autoincrementing. Full credit to @AdamJHall for this fix, this was his work. I've been able to test it and confirm it working.
  • Limit the number of rows to prefetch to reduce heap usage. This avoids a "Heap exhausted" error on conversion. Given that Adam and I both had the same issue , and arrived at the same fix separately, this should probably be in the default config?

These two fixes are provided in separate commits so you can take or leave them individually.

jimohalloran avatar Aug 22 '23 06:08 jimohalloran