wakapi icon indicating copy to clipboard operation
wakapi copied to clipboard

Docs: Add Troubleshooting guide for dbmigrate to wiki

Open janishutz opened this issue 2 months ago • 1 comments

It would be more convenient to add the following to the wiki page about DB migration:

Troubleshooting

When migrating to a Postgres Database, you likely will need to update the sequence number for the heartbeats table, which you can achieve by running the following SQL command:

SELECT MAX(id) + 1 AS number_to_enter FROM heartbeats;

Followed by the below command where you replace <OUTPUT> with the number that has just been output.

ALTER SEQUENCE heartbeats_id_seq RESTART WITH <OUTPUT>;

Of course, as an alternative that could be integrated directly into the migrate script. I may have time to have a look at that at some point over the next few weeks.

janishutz avatar Oct 02 '26 16:10 janishutz

Thanks, added it to the wiki page. Feel free to submit a PR for the dbmigrate.go when you get to it.

muety avatar Oct 02 '26 16:10 muety