summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorVolodymyr Kushnir <volodymyr.kushnir@me.com>2017-01-15 17:54:53 +0200
committerGitHub <noreply@github.com>2017-01-15 17:54:53 +0200
commit0ad1779435eaa3f35b05500947c2762e5b806d10 (patch)
tree2ff004b759e732a2e52a57b34f7deeeaf2cc9a90 /app
parent513aefdb2c092b687c567c62e6e3d70b9bcea4f4 (diff)
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.
Diffstat (limited to 'app')
-rw-r--r--app/Schema/Mysql.php4
1 files 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