BEGIN;
ALTER TABLE "cpr"
    ADD COLUMN user_id INTEGER,
    ADD COLUMN token_id INTEGER,
    ADD COLUMN company_id INTEGER;
ALTER TABLE "cpr"
    ADD CONSTRAINT fk_cpr_user
        FOREIGN KEY (user_id)
        REFERENCES "user"(user_id)
        ON DELETE RESTRICT;
ALTER TABLE "cpr"
    ADD CONSTRAINT fk_cpr_company
        FOREIGN KEY (company_id)
        REFERENCES "company"(company_id)
        ON DELETE RESTRICT;
ALTER TABLE "cpr"
    ADD CONSTRAINT fk_cpr_token
        FOREIGN KEY (token_id)
        REFERENCES "token"(token_id)
        ON DELETE RESTRICT;
COMMIT;