(refs #2)Fix PULL_REQUEST schema.

This commit is contained in:
takezoe
2013-07-14 01:25:27 +09:00
parent 5d327ccd53
commit bf3380755b
3 changed files with 21 additions and 15 deletions

View File

@@ -4,10 +4,12 @@ import scala.slick.driver.H2Driver.simple._
object PullRequests extends Table[PullRequest]("PULL_REQUEST") with IssueTemplate {
def pullRequestId = column[Int]("PULL_REQUEST_ID")
def commitId = column[String]("COMMIT_ID")
def * = pullRequestId ~ userName ~ repositoryName ~ issueId ~ commitId <> (PullRequest, PullRequest.unapply _)
def requestUserName = column[String]("REQUEST_USER_NAME")
def requestRepositoryName = column[String]("REQUEST_REPOSITORY_NAME")
def requestCommitId = column[String]("REQUEST_COMMIT_ID")
def * = pullRequestId ~ userName ~ repositoryName ~ issueId ~ requestUserName ~ requestRepositoryName ~ requestCommitId <> (PullRequest, PullRequest.unapply _)
def autoinc = userName ~ repositoryName ~ issueId ~ commitId returning pullRequestId
def autoinc = userName ~ repositoryName ~ issueId ~ requestUserName ~ requestRepositoryName ~ requestCommitId returning pullRequestId
def byPrimaryKey(pullRequestId: Int) = this.pullRequestId is pullRequestId.bind
}
@@ -16,4 +18,6 @@ case class PullRequest(
userName: String,
repositoryName: String,
issueId: Int,
commitId: String)
requestUserName: String,
requestRepositoryName: String,
requestCommitId: String)