diff --git a/core/database/readme.md b/core/database/readme.md index c40f9d76..e69de29b 100644 --- a/core/database/readme.md +++ b/core/database/readme.md @@ -1,38 +0,0 @@ - -## PENDING REMOVALS - -NONE - -## MYSQL ENCODING - -https://stackoverflow.com/questions/37307146/difference-between-utf8mb4-unicode-ci-and-utf8mb4-unicode-520-ci-collations-in-m - -https://mathiasbynens.be/notes/mysql-utf8mb4 - -https://medium.com/@adamhooper/in-mysql-never-use-utf8-use-utf8mb4-11761243e434 - -## MIGRATE ENCODING - -ALTER DATABASE documize CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -ALTER TABLE account CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -ALTER TABLE attachment CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -ALTER TABLE block CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -ALTER TABLE config CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -ALTER TABLE document CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -ALTER TABLE feedback CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -ALTER TABLE label CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -ALTER TABLE labelrole CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -ALTER TABLE link CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -ALTER TABLE organization CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -ALTER TABLE page CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -ALTER TABLE pagemeta CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -ALTER TABLE participant CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -ALTER TABLE pin CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -ALTER TABLE revision CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -ALTER TABLE search CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -ALTER TABLE share CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -ALTER TABLE user CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -ALTER TABLE useraction CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -ALTER TABLE useractivity CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -ALTER TABLE userconfig CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -ALTER TABLE userevent CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; diff --git a/core/database/scripts/mysql/db_00015.sql b/core/database/scripts/mysql/db_00015.sql index 43260e1e..1d845743 100644 --- a/core/database/scripts/mysql/db_00015.sql +++ b/core/database/scripts/mysql/db_00015.sql @@ -1,6 +1,5 @@ /* community edition */ -ALTER DATABASE documize CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE account CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE attachment CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE block CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; diff --git a/core/env/parser.go b/core/env/parser.go index 87611ee3..095602df 100644 --- a/core/env/parser.go +++ b/core/env/parser.go @@ -51,7 +51,6 @@ func configFile() (f Flags, ok bool) { var configFile string // First argument is always program being executed. - // No additional arguments means check for documize.conf file. if len(os.Args) == 1 { // No arguments, so we default to default config filename. @@ -72,14 +71,12 @@ func configFile() (f Flags, ok bool) { // Tell caller where the config came from. f.ConfigSource = configFile - // So now we have file and we parse the TOML format. + // We parse the TOML format config file. var ct ConfigToml if _, err := toml.DecodeFile(configFile, &ct); err != nil { fmt.Println(err) return } - - // TOML format cofig file is good so we map to flags. f.DBType = strings.ToLower(ct.Database.Type) f.DBConn = ct.Database.Connection f.Salt = ct.Database.Salt diff --git a/domain/auth/ldap/endpoint.go b/domain/auth/ldap/endpoint.go index e8c713bd..b7200715 100644 --- a/domain/auth/ldap/endpoint.go +++ b/domain/auth/ldap/endpoint.go @@ -126,8 +126,7 @@ func (h *Handler) Preview(w http.ResponseWriter, r *http.Request) { response.WriteJSON(w, result) } -// Sync gets list of Keycloak users and inserts new users into Documize -// and marks Keycloak disabled users as inactive. +// Sync gets list of LDAP users and inserts new users into Documize. func (h *Handler) Sync(w http.ResponseWriter, r *http.Request) { ctx := domain.GetRequestContext(r)