Skip to content

Commit 28d4fce

Browse files
authored
Merge pull request rails#162 from yahonda/use_utf8mb4
Use the same create database option as Rails Rakefile
2 parents c192cbf + eca5927 commit 28d4fce

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bootstrap.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@ install RabbitMQ rabbitmq-server
3434

3535
install PostgreSQL postgresql postgresql-contrib libpq-dev
3636
sudo -u postgres createuser --superuser vagrant
37-
sudo -u postgres createdb -O vagrant activerecord_unittest
38-
sudo -u postgres createdb -O vagrant activerecord_unittest2
37+
sudo -u postgres createdb -O vagrant -E UTF8 -T template0 activerecord_unittest
38+
sudo -u postgres createdb -O vagrant -E UTF8 -T template0 activerecord_unittest2
3939

4040
debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
4141
debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'
4242
install MySQL mysql-server libmysqlclient-dev
4343
# Set the password in an environment variable to avoid the warning issued if set with `-p`.
4444
MYSQL_PWD=root mysql -uroot <<SQL
4545
CREATE USER 'rails'@'localhost';
46-
CREATE DATABASE activerecord_unittest DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
47-
CREATE DATABASE activerecord_unittest2 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
46+
CREATE DATABASE activerecord_unittest DEFAULT CHARACTER SET utf8mb4;
47+
CREATE DATABASE activerecord_unittest2 DEFAULT CHARACTER SET utf8mb4;
4848
GRANT ALL PRIVILEGES ON activerecord_unittest.* to 'rails'@'localhost';
4949
GRANT ALL PRIVILEGES ON activerecord_unittest2.* to 'rails'@'localhost';
5050
GRANT ALL PRIVILEGES ON inexistent_activerecord_unittest.* to 'rails'@'localhost';

0 commit comments

Comments
 (0)