summaryrefslogtreecommitdiff
path: root/app/Schema/Mysql.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Schema/Mysql.php')
-rw-r--r--app/Schema/Mysql.php20
1 files changed, 19 insertions, 1 deletions
diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php
index 398b963e..274ce8c8 100644
--- a/app/Schema/Mysql.php
+++ b/app/Schema/Mysql.php
@@ -6,7 +6,25 @@ use PDO;
use Kanboard\Core\Security\Token;
use Kanboard\Core\Security\Role;
-const VERSION = 114;
+const VERSION = 115;
+
+function version_115(PDO $pdo)
+{
+ $pdo->exec("
+ CREATE TABLE column_has_restrictions (
+ restriction_id INT NOT NULL AUTO_INCREMENT,
+ project_id INT NOT NULL,
+ role_id INT NOT NULL,
+ column_id INT NOT NULL,
+ rule VARCHAR(255) NOT NULL,
+ UNIQUE(role_id, column_id, rule),
+ FOREIGN KEY(project_id) REFERENCES projects(id) ON DELETE CASCADE,
+ FOREIGN KEY(role_id) REFERENCES project_has_roles(role_id) ON DELETE CASCADE,
+ FOREIGN KEY(column_id) REFERENCES columns(id) ON DELETE CASCADE,
+ PRIMARY KEY(restriction_id)
+ ) ENGINE=InnoDB CHARSET=utf8
+ ");
+}
function version_114(PDO $pdo)
{