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.
This commit is contained in:
Volodymyr Kushnir 2017-01-15 17:54:53 +02:00 committed by GitHub
parent 513aefdb2c
commit 0ad1779435
1 changed files with 2 additions and 2 deletions

View File

@ -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