ALTER TABLE dictionary_entry
    ALTER entry_id ADD GENERATED ALWAYS AS IDENTITY;
ALTER TABLE dictionary_false_recommendation_entry
    ALTER entry_id ADD GENERATED ALWAYS AS IDENTITY;
ALTER TABLE dictionary_false_positive_entry
    ALTER entry_id ADD GENERATED ALWAYS AS IDENTITY;

SELECT setval(pg_get_serial_sequence('dictionary_entry', 'entry_id'), (select coalesce(max(entry_id) + 1, 1) from dictionary_entry));
SELECT setval(pg_get_serial_sequence('dictionary_false_recommendation_entry', 'entry_id'), (select coalesce(max(entry_id) + 1, 1) from dictionary_false_recommendation_entry));
SELECT setval(pg_get_serial_sequence('dictionary_false_positive_entry', 'entry_id'), (select coalesce(max(entry_id) + 1, 1) from dictionary_false_positive_entry));
