Hey Matei,
I believe I figured it out.
Head to the Query Library in retool.
then follow these steps:
- Create a sequence if one doesn't already exist (copy and past and run the query):
CREATE SEQUENCE candidates_entry_id_seq;
- Alter the
id
column to use the sequence (copy and past and run the query):
ALTER TABLE candidates_entry
ALTER COLUMN id SET DEFAULT nextval('candidates_entry_id_seq');
- (Optional) Ensure the sequence starts with a value higher than the current maximum
id
in the table:
SELECT setval('candidates_entry_id_seq', (SELECT MAX(id) FROM candidates_entry));
I adjusted the query so it would work specifically for your case (candidates_entry_id_seq)
anyone else that finds this useful and would like to do the same just change as follow:
candidates_entry_id_seq
candidates_entry - change this part to your table name.
id - change this part to your column name.