ALTER TABLE "public"."internal_order"
DROP CONSTRAINT "doc_refering",
ADD COLUMN "id_out_site_user" int8,
ADD FOREIGN KEY ("id_out_site_user") REFERENCES "public"."out_site_user" ("id") ON DELETE RESTRICT ON UPDATE RESTRICT;


UPDATE "public"."internal_order" SET "id_out_site_user"=1;