Migrating from Sqlite to Postgressql: guid hash too long

#1

Hi,

I just tried to migrate my (small) Nextcloud installation from Sqlite to Postgres.
After some time I ran into an error migrating oc_news_items. The migration script complained, that the guid_hash field can only take 32 characters (varchar(32)) but has more content.

The Sqlite database schema defines the column as 32 characters wide, but it has indeed entries which are longer (64 characters).
Postgres obviously doesn’t accept that.

This installation is quite old (not the version - I’m using latest stable versions everywhere) so it has seen a lot of database migrations over its lifetime.

So my question is: is it safe to truncate the guid_hash column to 32 characters in my Sqlite database so that I can perform the migration successfully? I’m not sure about the implications this would have.

Otherwise I’d have to disable the news app, migrate, then start from scratch.

Or is there another way?

I’m thankful for any input on this strange issue.

Sebi