language: ruby rvm: - 2.6.5 - 2.7.1 before_install: - sudo apt-get update - sudo apt-get --yes remove postgresql\* - sudo apt-get install -y postgresql-12 postgresql-client-12 - sudo cp /etc/postgresql/{9.6,12}/main/pg_hba.conf - sudo service postgresql restart 12 gemfile: - gemfiles/activerecord_4.gemfile - gemfiles/activerecord_5.gemfile - gemfiles/activerecord_6.gemfile matrix: exclude: - rvm: 2.7.1 gemfile: gemfiles/activerecord_4.gemfile services: - postgresql before_script: - psql -c 'create database postgresql_cursor_test;' -U postgres - psql -c 'CREATE ROLE travis SUPERUSER LOGIN CREATEDB;' -U postgres - psql -c 'create table products ( id serial primary key, data varchar);' -U postgres -d postgresql_cursor_test - psql -c 'create table prices ( id serial primary key, data varchar, product_id integer);' -U postgres -d postgresql_cursor_test addons: postgresql: '12.3'