1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-21 06:09:42 +02:00

Support MySQL 8.x series

Two issues resolved relating to MySQL 8:

1. DB version checking skips MINOR/PATCH checks if MAJOR release changed.
2. Keyword 'admin' quoted to ensure MySQL compat.

Closes #152
This commit is contained in:
sauls8t 2018-05-10 15:14:50 +01:00
parent 0f87d5b07e
commit 2066f72258
7 changed files with 700 additions and 673 deletions

View file

@ -153,7 +153,7 @@ func setupAccount(rt *env.Runtime, completion onboardRequest, serial string) (er
// Link user to organization.
accountID := uniqueid.Generate()
sql = fmt.Sprintf("insert into account (refid, userid, orgid, admin, editor) values (\"%s\", \"%s\", \"%s\",1, 1)", accountID, userID, orgID)
sql = fmt.Sprintf("insert into account (refid, userid, orgid, `admin`, editor) values (\"%s\", \"%s\", \"%s\",1, 1)", accountID, userID, orgID)
_, err = runSQL(rt, sql)
if err != nil {