lib/gumboot/shared_examples/database_schema.rb in aaf-gumboot-2.6.2 vs lib/gumboot/shared_examples/database_schema.rb in aaf-gumboot-2.6.3

- old
+ new

@@ -28,18 +28,18 @@ it 'has the correct collation' do exemptions = defined?(collation_exemptions) ? collation_exemptions : [] db_collation = query('SHOW VARIABLES LIKE "collation_database"') .first[:Value] - expect(db_collation).to eq('utf8_bin') + expect(%w[utf8_bin utf8mb3_bin utf8mb4_bin]).to include(db_collation) query('SHOW TABLE STATUS').each do |table| table_name = table[:Name] next if table_name == 'schema_migrations' expect(table).to( - have_collations(%w[utf8_bin utf8mb4_bin], "`#{table_name}`") + have_collations(%w[utf8_bin utf8mb3_bin utf8mb4_bin], "`#{table_name}`") ) query("SHOW FULL COLUMNS FROM `#{table_name}`").each do |column| next unless column[:Collation] next if exemptions.any? do |except_table, except_columns| @@ -48,10 +48,10 @@ except_column == column[:Field].to_sym end end expect(column) - .to have_collations(%w[utf8_bin utf8_unicode_ci utf8mb4_bin utf8mb4_unicode_ci], + .to have_collations(%w[utf8_bin utf8_unicode_ci utf8mb3_bin utf8mb4_bin utf8mb4_unicode_ci], " `#{table_name}`.`#{column[:Field]}`") end end end end