CREATE TABLE PULL_REQUEST(
		PULL_REQUEST_ID INT AUTO_INCREMENT,
		USER_NAME VARCHAR(100) NOT NULL,
		REPOSITORY_NAME VARCHAR(100) NOT NULL,
		ISSUE_ID INT NOT NULL,
		REQUEST_USER_NAME VARCHAR(100) NOT NULL,
		REQUEST_REPOSITORY_NAME VARCHAR(100) NOT NULL,
		REQUEST_COMMIT_ID VARCHAR(40) NOT NULL
);

ALTER TABLE PULL_REQUEST ADD CONSTRAINT IDX_PULL_REQUEST_PK PRIMARY KEY (PULL_REQUEST_ID);
ALTER TABLE PULL_REQUEST ADD CONSTRAINT IDX_PULL_REQUEST_FK0 FOREIGN KEY (USER_NAME, REPOSITORY_NAME, ISSUE_ID) REFERENCES ISSUE (USER_NAME, REPOSITORY_NAME, ISSUE_ID);
ALTER TABLE PULL_REQUEST ADD CONSTRAINT IDX_PULL_REQUEST_FK1 FOREIGN KEY (REQUEST_USER_NAME, REQUEST_REPOSITORY_NAME) REFERENCES REPOSITORY (USER_NAME, REPOSITORY_NAME);
