]> source.dussan.org Git - gitea.git/commit
Fix postgres ID sequences broken by recreate-table (#15015)
authorzeripath <art27@cantab.net>
Thu, 18 Mar 2021 06:06:40 +0000 (06:06 +0000)
committerGitHub <noreply@github.com>
Thu, 18 Mar 2021 06:06:40 +0000 (02:06 -0400)
commit070c57867d95e4555b5c9ab83a66eb35a3ae2bb4
treecfcbeb2423eb5ffa556ac9155ba69a11292a7c94
parent71aca93decc10253133dcd77b64dae5d311d7163
Fix postgres ID sequences broken by recreate-table (#15015)

* Fix postgres ID sequences broken by recreate-table

Unfortunately there is a subtle problem with recreatetable on postgres which
leads to the sequences not being renamed and not being left at 0.

Fix #14725

Signed-off-by: Andrew Thornton <art27@cantab.net>
* let us try information_schema instead

Signed-off-by: Andrew Thornton <art27@cantab.net>
* try again

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: 6543 <6543@obermui.de>
models/consistency.go
models/migrations/migrations.go
models/migrations/v175.go [new file with mode: 0644]
modules/doctor/dbconsistency.go