Skip to content

Commit

Permalink
Instruct MySQL users to set DATABASE_ENCODING to utf8mb4.
Browse files Browse the repository at this point in the history
cf. GH-286
  • Loading branch information
knu committed Sep 10, 2014
1 parent 5101cd5 commit 3c3380d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .env.example
Expand Up @@ -26,6 +26,11 @@ DATABASE_PASSWORD=""
#DATABASE_PORT=3306
#DATABASE_SOCKET=/tmp/mysql.sock

# MySQL only: If you are running a MySQL server >=5.5.3, you should
# set DATABASE_ENCODING to utf8mb4 instead of utf8 so that the
# database can hold 4-byte UTF-8 characters like emoji.
#DATABASE_ENCODING=utf8mb4

This comment has been minimized.

Copy link
@cantino

cantino Oct 1, 2014

Member

Will this cause people to have the Specified key was too long; max key length is 1000 bytes error that showed up in #414 (comment) ?


# ==== Additional required production settings ====

# Configure Rails environment. This should only be needed in production and may cause errors in development.
Expand Down

2 comments on commit 3c3380d

@knu
Copy link
Member Author

@knu knu commented on 3c3380d Oct 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, for some reason I didn't consider much about the case where you make a fresh install with DATABASE_ENCODING=utf8mb4 because I had been focused on fixing existing installation. There was an assumption that the default database encoding which would affect those of the tables in it was utf8.

With the latest fix I committed a new database will be created in utf8 even if DATABASE_ENCODING is set to utf8mb4 so you can set up Huginn with DATABASE_ENCODING=utf8mb4 from the beginning.

@cantino
Copy link
Member

@cantino cantino commented on 3c3380d Oct 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, cool! :)

Please sign in to comment.