This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Accidently, I've got and restored a dump without proper sequence values | |
SELECT concat('SELECT set', left(substr(column_default, 5),-1),', (select max(', column_name,') from ', table_schema, '.', table_name, ')+1);') FROM information_schema.columns where column_default like 'nextval%'; | |
-- just save it into SQL and run |