diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-10-17 12:30:05 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-10-17 12:30:05 -0400 |
commit | 472f94efee77d8f47ece4ead7d36ee02e5df3e56 (patch) | |
tree | 3456ca052db268b1477aa8b9a741d14bb9927515 /app/Schema | |
parent | 3543f45c2d4d6e96e5b88c3168075c0d583fc261 (diff) |
Move webhook to project notification type
Diffstat (limited to 'app/Schema')
-rw-r--r-- | app/Schema/Mysql.php | 16 | ||||
-rw-r--r-- | app/Schema/Postgres.php | 15 | ||||
-rw-r--r-- | app/Schema/Sqlite.php | 15 |
3 files changed, 43 insertions, 3 deletions
diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php index edf63919..852dca92 100644 --- a/app/Schema/Mysql.php +++ b/app/Schema/Mysql.php @@ -6,7 +6,21 @@ use PDO; use Kanboard\Core\Security; use Kanboard\Model\Link; -const VERSION = 91; +const VERSION = 92; + +function version_92($pdo) +{ + $pdo->exec(" + CREATE TABLE project_has_notification_types ( + id INT NOT NULL AUTO_INCREMENT, + project_id INT NOT NULL, + notification_type VARCHAR(50), + PRIMARY KEY(id), + FOREIGN KEY(project_id) REFERENCES projects(id) ON DELETE CASCADE + UNIQUE(project_id, notification_type), + ) ENGINE=InnoDB CHARSET=utf8 + "); +} function version_91($pdo) { diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php index 0cc31616..ac8b15ee 100644 --- a/app/Schema/Postgres.php +++ b/app/Schema/Postgres.php @@ -6,7 +6,20 @@ use PDO; use Kanboard\Core\Security; use Kanboard\Model\Link; -const VERSION = 71; +const VERSION = 72; + +function version_72($pdo) +{ + $pdo->exec(" + CREATE TABLE project_has_notification_types ( + id SERIAL PRIMARY KEY, + project_id INTEGER NOT NULL, + notification_type VARCHAR(50), + FOREIGN KEY(project_id) REFERENCES projects(id) ON DELETE CASCADE, + UNIQUE(project_id, notification_type) + ) + "); +} function version_71($pdo) { diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php index 70b9d160..a1d5ee86 100644 --- a/app/Schema/Sqlite.php +++ b/app/Schema/Sqlite.php @@ -6,7 +6,20 @@ use Kanboard\Core\Security; use PDO; use Kanboard\Model\Link; -const VERSION = 86; +const VERSION = 87; + +function version_87($pdo) +{ + $pdo->exec(" + CREATE TABLE project_has_notification_types ( + id INTEGER PRIMARY KEY, + project_id INTEGER NOT NULL, + notification_type TEXT, + FOREIGN KEY(project_id) REFERENCES projects(id) ON DELETE CASCADE, + UNIQUE(project_id, notification_type) + ) + "); +} function version_86($pdo) { |