I have the following set up,
CREATE TABLE auth_user ( id int PRIMARY KEY ); CREATE TABLE links_chatpicmessage ();
I\'m trying to add a
You can do this in Postgres on one line:
ALTER TABLE links_chatpicmessage ADD COLUMN sender INTEGER REFERENCES auth_user (id);
You don't need to manually set a name. Postgres will automatically name this constraint "links_chatpicmessage_auth_user_id_fkey".