summaryrefslogtreecommitdiff
path: root/app/Schema/Postgres.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-04-18 18:44:45 -0400
committerFrederic Guillot <fred@kanboard.net>2015-04-18 18:44:45 -0400
commit370b5a0fd7c1dba60e3b973506ba087adba42be0 (patch)
tree8da109b4fc90062d6eebb69d4ae2efca4da1bac3 /app/Schema/Postgres.php
parentf53bb88d10836e5c31efb958683d8bf3829eecbf (diff)
Add Slack and Hipchat integrations for each projects
Diffstat (limited to 'app/Schema/Postgres.php')
-rw-r--r--app/Schema/Postgres.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php
index b5cf72a6..6973b266 100644
--- a/app/Schema/Postgres.php
+++ b/app/Schema/Postgres.php
@@ -6,7 +6,24 @@ use PDO;
use Core\Security;
use Model\Link;
-const VERSION = 45;
+const VERSION = 46;
+
+function version_46($pdo)
+{
+ $pdo->exec("
+ CREATE TABLE project_integrations (
+ id SERIAL PRIMARY KEY,
+ project_id INTEGER NOT NULL UNIQUE,
+ hipchat BOOLEAN DEFAULT '0',
+ hipchat_api_url VARCHAR(255) DEFAULT 'https://api.hipchat.com',
+ hipchat_room_id VARCHAR(255),
+ hipchat_room_token VARCHAR(255),
+ slack BOOLEAN DEFAULT '0',
+ slack_webhook_url VARCHAR(255),
+ FOREIGN KEY(project_id) REFERENCES projects(id) ON DELETE CASCADE
+ )
+ ");
+}
function version_45($pdo)
{