summaryrefslogtreecommitdiff
path: root/app/Schema
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-05-11 21:07:59 -0400
committerFrederic Guillot <fred@kanboard.net>2015-05-11 21:07:59 -0400
commit9e9410df24b1d88d4760510ab496f5fa36f24a66 (patch)
tree99ec17ed40c52618a2bbb90d72e6da272eacb38b /app/Schema
parenta845e3f47891eca6cdfd8082cdfddbbef0eeecd1 (diff)
Add Jabber/XMPP integration
Diffstat (limited to 'app/Schema')
-rw-r--r--app/Schema/Mysql.php22
-rw-r--r--app/Schema/Postgres.php22
-rw-r--r--app/Schema/Sqlite.php22
3 files changed, 63 insertions, 3 deletions
diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php
index 9ed23ee0..369d4826 100644
--- a/app/Schema/Mysql.php
+++ b/app/Schema/Mysql.php
@@ -6,7 +6,27 @@ use PDO;
use Core\Security;
use Model\Link;
-const VERSION = 67;
+const VERSION = 68;
+
+function version_68($pdo)
+{
+ $rq = $pdo->prepare('INSERT INTO settings VALUES (?, ?)');
+ $rq->execute(array('integration_jabber', '0'));
+ $rq->execute(array('integration_jabber_server', ''));
+ $rq->execute(array('integration_jabber_domain', ''));
+ $rq->execute(array('integration_jabber_username', ''));
+ $rq->execute(array('integration_jabber_password', ''));
+ $rq->execute(array('integration_jabber_nickname', 'kanboard'));
+ $rq->execute(array('integration_jabber_room', ''));
+
+ $pdo->exec("ALTER TABLE project_integrations ADD COLUMN jabber INTEGER DEFAULT '0'");
+ $pdo->exec("ALTER TABLE project_integrations ADD COLUMN jabber_server TEXT DEFAULT ''");
+ $pdo->exec("ALTER TABLE project_integrations ADD COLUMN jabber_domain TEXT DEFAULT ''");
+ $pdo->exec("ALTER TABLE project_integrations ADD COLUMN jabber_username TEXT DEFAULT ''");
+ $pdo->exec("ALTER TABLE project_integrations ADD COLUMN jabber_password TEXT DEFAULT ''");
+ $pdo->exec("ALTER TABLE project_integrations ADD COLUMN jabber_nickname TEXT DEFAULT 'kanboard'");
+ $pdo->exec("ALTER TABLE project_integrations ADD COLUMN jabber_room TEXT DEFAULT ''");
+}
function version_67($pdo)
{
diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php
index f1262816..1cd0ab8f 100644
--- a/app/Schema/Postgres.php
+++ b/app/Schema/Postgres.php
@@ -6,7 +6,27 @@ use PDO;
use Core\Security;
use Model\Link;
-const VERSION = 48;
+const VERSION = 49;
+
+function version_49($pdo)
+{
+ $rq = $pdo->prepare('INSERT INTO settings VALUES (?, ?)');
+ $rq->execute(array('integration_jabber', '0'));
+ $rq->execute(array('integration_jabber_server', ''));
+ $rq->execute(array('integration_jabber_domain', ''));
+ $rq->execute(array('integration_jabber_username', ''));
+ $rq->execute(array('integration_jabber_password', ''));
+ $rq->execute(array('integration_jabber_nickname', 'kanboard'));
+ $rq->execute(array('integration_jabber_room', ''));
+
+ $pdo->exec("ALTER TABLE project_integrations ADD COLUMN jabber INTEGER DEFAULT '0'");
+ $pdo->exec("ALTER TABLE project_integrations ADD COLUMN jabber_server TEXT DEFAULT ''");
+ $pdo->exec("ALTER TABLE project_integrations ADD COLUMN jabber_domain TEXT DEFAULT ''");
+ $pdo->exec("ALTER TABLE project_integrations ADD COLUMN jabber_username TEXT DEFAULT ''");
+ $pdo->exec("ALTER TABLE project_integrations ADD COLUMN jabber_password TEXT DEFAULT ''");
+ $pdo->exec("ALTER TABLE project_integrations ADD COLUMN jabber_nickname TEXT DEFAULT 'kanboard'");
+ $pdo->exec("ALTER TABLE project_integrations ADD COLUMN jabber_room TEXT DEFAULT ''");
+}
function version_48($pdo)
{
diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php
index 714d0e2f..830fd916 100644
--- a/app/Schema/Sqlite.php
+++ b/app/Schema/Sqlite.php
@@ -6,7 +6,27 @@ use Core\Security;
use PDO;
use Model\Link;
-const VERSION = 66;
+const VERSION = 67;
+
+function version_67($pdo)
+{
+ $rq = $pdo->prepare('INSERT INTO settings VALUES (?, ?)');
+ $rq->execute(array('integration_jabber', '0'));
+ $rq->execute(array('integration_jabber_server', ''));
+ $rq->execute(array('integration_jabber_domain', ''));
+ $rq->execute(array('integration_jabber_username', ''));
+ $rq->execute(array('integration_jabber_password', ''));
+ $rq->execute(array('integration_jabber_nickname', 'kanboard'));
+ $rq->execute(array('integration_jabber_room', ''));
+
+ $pdo->exec("ALTER TABLE project_integrations ADD COLUMN jabber INTEGER DEFAULT '0'");
+ $pdo->exec("ALTER TABLE project_integrations ADD COLUMN jabber_server TEXT DEFAULT ''");
+ $pdo->exec("ALTER TABLE project_integrations ADD COLUMN jabber_domain TEXT DEFAULT ''");
+ $pdo->exec("ALTER TABLE project_integrations ADD COLUMN jabber_username TEXT DEFAULT ''");
+ $pdo->exec("ALTER TABLE project_integrations ADD COLUMN jabber_password TEXT DEFAULT ''");
+ $pdo->exec("ALTER TABLE project_integrations ADD COLUMN jabber_nickname TEXT DEFAULT 'kanboard'");
+ $pdo->exec("ALTER TABLE project_integrations ADD COLUMN jabber_room TEXT DEFAULT ''");
+}
function version_66($pdo)
{