You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use the same create database option as Rails Rakefile
* DEFAULT CHARACTER SET utf8mb4 for MySQL
https://github.com/rails/rails/blob/5431e17733366da1fd10f2cd3039d66a56012683/activerecord/Rakefile#L97-L98
```
%x( mysql --user=#{config["arunit"]["username"]} --password=#{config["arunit"]["password"]} -e "create DATABASE #{config["arunit"]["database"]} DEFAULT CHARACTER SET utf8mb4" )
%x( mysql --user=#{config["arunit2"]["username"]} --password=#{config["arunit2"]["password"]} -e "create DATABASE #{config["arunit2"]["database"]} DEFAULT CHARACTER SET utf8mb4" )
```
* Do not specify `DEFAULT COLLATE` as Rails Raketask removed
rails/rails@d54d0c9#diff-6c25b8e13c63a297ab5298948548caef
> There should be no "one size fits all" collation in MySQL 5.7.
> Let MySQL server choose the default collation for Active Record
> unit test databases.
* Use `-E UTF8 -T template0` option for PostgreSQL database
https://github.com/rails/rails/blob/5431e17733366da1fd10f2cd3039d66a56012683/activerecord/Rakefile#L116-L117
```
%x( createdb -E UTF8 -T template0 #{config["arunit"]["database"]} )
%x( createdb -E UTF8 -T template0 #{config["arunit2"]["database"]} )
```
0 commit comments