can't select the table id I always select the table id field as a foreign key but today I found that the reference was broken, and the id can't be selected, it not appear as an option
I'd suggest PGAdmin also, but if you're not a DB person and figuring out a whole new IDE sounds like overkill for this you could create a new Query and use the Retool Database resource type, then switch to SQL Mode and add:
BEGIN;
ALTER TABLE table_name
DROP CONSTRAINT constraint_fkey;
ALTER TABLE child_table
ADD CONSTRAINT constraint_name
FOREIGN KEY (fk_columns)
REFERENCES parent_table(parent_key_columns);
// you can also use the bellow line, just be sure to delete the semicolon above this line
// ON DELETE CASCADE;
COMMIT;
Then you can hit 'run' on the query and after it finishes running you can delete this Query, which I probably would incase someone would accidently run it or links it to a button or something.... I mean, obv unless you want to keep it to reuse for whatever reason