Set collation on auto-migrate

11 views
Skip to first unread message

Yoann Aubry

unread,
Sep 23, 2016, 5:38:17 AM9/23/16
to LoopbackJS
Hello,

The automigrate script creates tables with a default latin1_swedish_ci collation. 
I have defined collation, without success  in datasource.js

"mydb": {
  "connector": "mysql",
  [...]
   "collation":"utf8_general_ci"
}

and in my models :
{

    "options": {
        "mysql": {
              "collation":"utf8_general_ci"
        }
    },
"properties [...]

}

Have i missed something ?

thx



Yoann Aubry

unread,
Sep 23, 2016, 5:49:45 AM9/23/16
to LoopbackJS
I have found a solution by setting a default collation for the database. 
Reply all
Reply to author
Forward
0 new messages