Skip to content

Commit

Permalink
Merge pull request #454 from gocardless/thom/fix_mysql_ci_image
Browse files Browse the repository at this point in the history
Fix CI issues
  • Loading branch information
thom-oman authored Feb 4, 2022
2 parents 16207a9 + 20be31e commit 923b63f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ references:
- "main"

mysql_versions: &mysql_versions
- "5.7.18"
- "5.7"

psql_versions: &psql_versions
- "9.6"
Expand All @@ -79,7 +79,7 @@ jobs:
CIRCLE_TEST_REPORTS: /tmp/circle_artifacts/
DATABASE_URL: mysql2://foobar:[email protected]/statesman_test
DATABASE_DEPENDENCY_PORT: "3306"
- image: circleci/mysql:<< parameters.mysql_version >>
- image: cimg/mysql:<< parameters.mysql_version >>
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_USER: foobar
Expand Down
7 changes: 5 additions & 2 deletions lib/statesman/adapters/active_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,11 @@ def updated_column_and_timestamp
end

def default_timezone
# Rails 7 deprecates ActiveRecord::Base.default_timezone in favour of ActiveRecord.default_timezone
return ::ActiveRecord.default_timezone if ::ActiveRecord.respond_to?(:default_timezone)
# Rails 7 deprecates ActiveRecord::Base.default_timezone
# in favour of ActiveRecord.default_timezone
if ::ActiveRecord.respond_to?(:default_timezone)
return ::ActiveRecord.default_timezone
end

::ActiveRecord::Base.default_timezone
end
Expand Down

0 comments on commit 923b63f

Please sign in to comment.