Hi I have PostgreSQL database with some values. When I created the tables, I didn’t pay much attention to their ID column. Now if I check the sequences, I see that the max value of some of them is of type int. How to change them to bigint without changing the IDs of the data. I changed the ID fields type in the tables from int to bigint. then
ALTER SEQUENCE public.kvitansiya_id_seq MAXVALUE 9223372036854775807; command returns an error such as
SQL Error [22023]: ERROR: MAXVALUE (9223372036854775807) out of sequence data type (integer).
Here is photo of sequences tables on DBeaver.

ALTER SEQUENCE public.kvitansiya_id_seq as bigint MAXVALUE 9223372036854775807