Note: I opened a bug report for this (Unable to enable File Sharing after migration from SQLite to Postgres · Issue #25414 · nextcloud/server · GitHub), please see the bug report for complete details.
After migrating from SQLite to Postgres, I cannot re-enable file sharing anymore. Whenever I try, I get the following issue:
The message in the screenshot in the link is
An exception occurred while executing ' SELECT "remote", "share_token", "password", "mountpoint", "owner" FROM "oc_share_external" WHERE "user" = ? AND "accepted" = ? ' with params ["wojtek", 1]: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "oc_share_external" does not exist LINE 3: FROM "oc_share_external" ^
Is there something that I can do to have the right structure of the DB (which I believe is the issue)?