mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 22:15:51 +01:00
(refs #74)Add WEB_HOOK table.
This commit is contained in:
8
src/main/resources/update/1_6.sql
Normal file
8
src/main/resources/update/1_6.sql
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
CREATE TABLE WEB_HOOK (
|
||||||
|
USER_NAME VARCHAR(100) NOT NULL,
|
||||||
|
REPOSITORY_NAME VARCHAR(100) NOT NULL,
|
||||||
|
URL VARCHAR(200) NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
ALTER TABLE WEB_HOOK ADD CONSTRAINT IDX_WEB_HOOK_PK PRIMARY KEY (USER_NAME, REPOSITORY_NAME, URL);
|
||||||
|
ALTER TABLE WEB_HOOK ADD CONSTRAINT IDX_WEB_HOOK_FK0 FOREIGN KEY (USER_NAME, REPOSITORY_NAME) REFERENCES REPOSITORY (USER_NAME, REPOSITORY_NAME);
|
||||||
16
src/main/scala/model/WebHook.scala
Normal file
16
src/main/scala/model/WebHook.scala
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
import scala.slick.driver.H2Driver.simple._
|
||||||
|
|
||||||
|
object WebHooks extends Table[WebHook]("WEB_HOOK") with BasicTemplate {
|
||||||
|
def url = column[String]("URL")
|
||||||
|
def * = userName ~ repositoryName ~ url <> (WebHook, WebHook.unapply _)
|
||||||
|
|
||||||
|
def byPrimaryKey(owner: String, repository: String) = byRepository(owner, repository)
|
||||||
|
}
|
||||||
|
|
||||||
|
case class WebHook(
|
||||||
|
userName: String,
|
||||||
|
repositoryName: String,
|
||||||
|
url: String
|
||||||
|
)
|
||||||
@@ -49,6 +49,7 @@ object AutoUpdate {
|
|||||||
* The history of versions. A head of this sequence is the current BitBucket version.
|
* The history of versions. A head of this sequence is the current BitBucket version.
|
||||||
*/
|
*/
|
||||||
val versions = Seq(
|
val versions = Seq(
|
||||||
|
Version(1, 6),
|
||||||
Version(1, 5),
|
Version(1, 5),
|
||||||
Version(1, 4),
|
Version(1, 4),
|
||||||
new Version(1, 3){
|
new Version(1, 3){
|
||||||
|
|||||||
Reference in New Issue
Block a user