diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-05-18 21:04:06 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-05-18 21:04:06 -0400 |
commit | 6d5ffaa848dcbc09538f79cb0cdea08f5306f4a4 (patch) | |
tree | 2b782b7bc4b7f25cfa9021f7250450c7534f86cb /app/Schema | |
parent | db95e96f92a15660dc043eb033a0f7737b59a030 (diff) |
Send all Kanboard events to the webhook (breaking change)
Diffstat (limited to 'app/Schema')
-rw-r--r-- | app/Schema/Mysql.php | 11 | ||||
-rw-r--r-- | app/Schema/Postgres.php | 11 | ||||
-rw-r--r-- | app/Schema/Sqlite.php | 11 |
3 files changed, 30 insertions, 3 deletions
diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php index 593cca80..aa611a6e 100644 --- a/app/Schema/Mysql.php +++ b/app/Schema/Mysql.php @@ -6,7 +6,16 @@ use PDO; use Core\Security; use Model\Link; -const VERSION = 70; +const VERSION = 71; + +function version_71($pdo) +{ + $rq = $pdo->prepare('INSERT INTO `settings` VALUES (?, ?)'); + $rq->execute(array('webhook_url', '')); + + $pdo->exec("DELETE FROM `settings` WHERE `option`='webhook_url_task_creation'"); + $pdo->exec("DELETE FROM `settings` WHERE `option`='webhook_url_task_modification'"); +} function version_70($pdo) { diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php index 4ec6965f..0afcd26a 100644 --- a/app/Schema/Postgres.php +++ b/app/Schema/Postgres.php @@ -6,7 +6,16 @@ use PDO; use Core\Security; use Model\Link; -const VERSION = 51; +const VERSION = 52; + +function version_52($pdo) +{ + $rq = $pdo->prepare('INSERT INTO settings VALUES (?, ?)'); + $rq->execute(array('webhook_url', '')); + + $pdo->exec("DELETE FROM settings WHERE option='webhook_url_task_creation'"); + $pdo->exec("DELETE FROM settings WHERE option='webhook_url_task_modification'"); +} function version_51($pdo) { diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php index 84892aaf..43fb136e 100644 --- a/app/Schema/Sqlite.php +++ b/app/Schema/Sqlite.php @@ -6,7 +6,16 @@ use Core\Security; use PDO; use Model\Link; -const VERSION = 69; +const VERSION = 70; + +function version_70($pdo) +{ + $rq = $pdo->prepare('INSERT INTO settings VALUES (?, ?)'); + $rq->execute(array('webhook_url', '')); + + $pdo->exec("DELETE FROM settings WHERE option='webhook_url_task_creation'"); + $pdo->exec("DELETE FROM settings WHERE option='webhook_url_task_modification'"); +} function version_69($pdo) { |