mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
d54d0c9575
* Use utf8mb4 character set by default `utf8mb4` character set supports supplementary characters including emoji. `utf8` character set with 3-Byte encoding is not enough to support them. There was a downside of 4-Byte length character set with MySQL 5.5 and 5.6: "ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes" for Rails string data type which is mapped to varchar(255) type. MySQL 5.7 supports 3072 byte key prefix length by default. * Remove `DEFAULT COLLATE` from Active Record unit test databases 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. Users can choose their best collation for their databases by setting `options[:collation]` based on their requirements. * InnoDB FULLTEXT indexes support since MySQL 5.6 it does not have to use MyISAM storage engine whose maximum key length is 1000 bytes. Using MyISAM storag engine with utf8mb4 character set would cause "Specified key was too long; max key length is 1000 bytes" https://dev.mysql.com/doc/refman/5.6/en/innodb-fulltext-index.html * References "10.9.1 The utf8mb4 Character Set (4-Byte UTF-8 Unicode Encoding)" https://dev.mysql.com/doc/refman/5.7/en/charset-unicode-utf8mb4.html "10.9.2 The utf8mb3 Character Set (3-Byte UTF-8 Unicode Encoding)" https://dev.mysql.com/doc/refman/5.7/en/charset-unicode-utf8.html "14.8.1.7 Limits on InnoDB Tables" https://dev.mysql.com/doc/refman/5.7/en/innodb-restrictions.html > If innodb_large_prefix is enabled (the default), the index key prefix limit is 3072 bytes > for InnoDB tables that use DYNAMIC or COMPRESSED row format. * CI against MySQL 5.7 Followed this instruction and changed root password to empty string. https://docs.travis-ci.com/user/database-setup/#MySQL-57 * The recommended minimum version of MySQL is 5.7.9 to support utf8mb4 character set and `innodb_default_row_format` MySQL 5.7.9 introduces `innodb_default_row_format` to support 3072 byte length index by default. Users do not have to change MySQL database configuration to support Rails string type. https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_default_row_format https://dev.mysql.com/doc/refman/5.7/en/innodb-restrictions.html > If innodb_large_prefix is enabled (the default), > the index key prefix limit is 3072 bytes for InnoDB tables that use DYNAMIC or COMPRESSED row format. * The recommended minimum version of MariaDB is 10.2.2 MariaDB 10.2.2 is the first version of MariaDB supporting `innodb_default_row_format` Also MariaDB says "MySQL 5.7 is compatible with MariaDB 10.2". - innodb_default_row_format https://mariadb.com/kb/en/library/xtradbinnodb-server-system-variables/#innodb_default_row_format - "MariaDB versus MySQL - Compatibility" https://mariadb.com/kb/en/library/mariadb-vs-mysql-compatibility/ > MySQL 5.7 is compatible with MariaDB 10.2 - "Supported Character Sets and Collations" https://mariadb.com/kb/en/library/supported-character-sets-and-collations/
100 lines
2.3 KiB
YAML
100 lines
2.3 KiB
YAML
default_connection: <%= defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3' %>
|
|
|
|
with_manual_interventions: false
|
|
|
|
connections:
|
|
jdbcderby:
|
|
arunit: activerecord_unittest
|
|
arunit2: activerecord_unittest2
|
|
|
|
jdbch2:
|
|
arunit: activerecord_unittest
|
|
arunit2: activerecord_unittest2
|
|
|
|
jdbchsqldb:
|
|
arunit: activerecord_unittest
|
|
arunit2: activerecord_unittest2
|
|
|
|
jdbcmysql:
|
|
arunit:
|
|
username: rails
|
|
encoding: utf8
|
|
arunit2:
|
|
username: rails
|
|
encoding: utf8
|
|
|
|
jdbcpostgresql:
|
|
arunit:
|
|
username: <%= ENV['user'] || 'rails' %>
|
|
arunit2:
|
|
username: <%= ENV['user'] || 'rails' %>
|
|
|
|
jdbcsqlite3:
|
|
arunit:
|
|
database: <%= FIXTURES_ROOT %>/fixture_database.sqlite3
|
|
timeout: 5000
|
|
arunit2:
|
|
database: <%= FIXTURES_ROOT %>/fixture_database_2.sqlite3
|
|
timeout: 5000
|
|
|
|
db2:
|
|
arunit:
|
|
adapter: ibm_db
|
|
host: localhost
|
|
username: arunit
|
|
password: arunit
|
|
database: arunit
|
|
arunit2:
|
|
adapter: ibm_db
|
|
host: localhost
|
|
username: arunit
|
|
password: arunit
|
|
database: arunit2
|
|
|
|
mysql2:
|
|
arunit:
|
|
username: rails
|
|
encoding: utf8mb4
|
|
collation: utf8mb4_unicode_ci
|
|
arunit2:
|
|
username: rails
|
|
encoding: utf8mb4
|
|
|
|
oracle:
|
|
arunit:
|
|
adapter: oracle_enhanced
|
|
database: <%= ENV['ARUNIT_DB_NAME'] || 'orcl' %>
|
|
username: <%= ENV['ARUNIT_USER_NAME'] || 'arunit' %>
|
|
password: <%= ENV['ARUNIT_PASSWORD'] || 'arunit' %>
|
|
emulate_oracle_adapter: true
|
|
arunit2:
|
|
adapter: oracle_enhanced
|
|
database: <%= ENV['ARUNIT_DB_NAME'] || 'orcl' %>
|
|
username: <%= ENV['ARUNIT2_USER_NAME'] || 'arunit2' %>
|
|
password: <%= ENV['ARUNIT2_PASSWORD'] || 'arunit2' %>
|
|
emulate_oracle_adapter: true
|
|
|
|
postgresql:
|
|
arunit:
|
|
min_messages: warning
|
|
arunit_without_prepared_statements:
|
|
min_messages: warning
|
|
prepared_statements: false
|
|
arunit2:
|
|
min_messages: warning
|
|
|
|
sqlite3:
|
|
arunit:
|
|
database: <%= FIXTURES_ROOT %>/fixture_database.sqlite3
|
|
timeout: 5000
|
|
arunit2:
|
|
database: <%= FIXTURES_ROOT %>/fixture_database_2.sqlite3
|
|
timeout: 5000
|
|
|
|
sqlite3_mem:
|
|
arunit:
|
|
adapter: sqlite3
|
|
database: ':memory:'
|
|
arunit2:
|
|
adapter: sqlite3
|
|
database: ':memory:'
|