mirror of
https://github.com/status-im/fathom.git
synced 2025-03-01 11:30:28 +00:00
set pipe concat mode when using mysql
This commit is contained in:
parent
6f45edc790
commit
c9213b0b72
@ -29,6 +29,12 @@ func New(c *Config) *sqlstore {
|
||||
// write log statement
|
||||
log.Infof("Connected to %s database: %s", c.Driver, c.Name)
|
||||
|
||||
// Driver specific database options
|
||||
if c.Driver == "mysql" {
|
||||
// Because SQLite doesn't have CONCAT, tell MySQL to accept pipes for concatenating string columns
|
||||
db.Exec("SET sql_mode=PIPES_AS_CONCAT;")
|
||||
}
|
||||
|
||||
// run migrations
|
||||
db.Migrate()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user