From 0ad1779435eaa3f35b05500947c2762e5b806d10 Mon Sep 17 00:00:00 2001 From: Volodymyr Kushnir Date: Sun, 15 Jan 2017 17:54:53 +0200 Subject: Fix Kanboard installation errors on MySQL 8.0.0 This is a quick and dirty fix for "Internal Error: Unable to run SQL migrations: Running migration \Schema\version_113, SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'role VARCHAR(255) NOT NULL,". As per https://dev.mysql.com/doc/refman/8.0/en/keywords.html **role** is a reserved keyword in MySQL 8.0.0. --- app/Schema/Mysql.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php index fac8688a..cc691d1f 100644 --- a/app/Schema/Mysql.php +++ b/app/Schema/Mysql.php @@ -63,9 +63,9 @@ function version_113(PDO $pdo) $pdo->exec(" CREATE TABLE project_has_roles ( role_id INT NOT NULL AUTO_INCREMENT, - role VARCHAR(255) NOT NULL, + `role` VARCHAR(255) NOT NULL, project_id INT NOT NULL, - UNIQUE(project_id, role), + UNIQUE(project_id, `role`), FOREIGN KEY(project_id) REFERENCES projects(id) ON DELETE CASCADE, PRIMARY KEY(role_id) ) ENGINE=InnoDB CHARSET=utf8 -- cgit v1.2.3