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

Refactoring of database init code

This commit is contained in:
Harvey Kandola 2018-09-12 20:03:34 +01:00
parent d7fea2125f
commit 3bccd6a537
7 changed files with 155 additions and 134 deletions

View file

@ -37,6 +37,15 @@ import (
// StoreMySQL creates MySQL provider
func StoreMySQL(r *env.Runtime, s *domain.Store) {
// Required connection string parameters and defaults.
r.Storage.Params = map[string]string{
"charset": "utf8mb4",
"parseTime": "True",
"maxAllowedPacket": "104857600", // 4194304 // 16777216 = 16MB // 104857600 = 100MB
}
r.Storage.Example = "database connection string format is 'username:password@tcp(host:3306)/database'"
s.Account = account.Scope{Runtime: r}
s.Activity = activity.Scope{Runtime: r}
s.Attachment = attachment.Scope{Runtime: r}