ALTER TABLE <table name> WITH NOCHECK
ADD CONSTRAINT attachments_user_id_fkey FOREIGN KEY (user_id)
REFERENCES public.users (id) MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE NO ACTION;
The above query is throwing the following error ERROR: syntax error at or near "WITH NOCHECK"