Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove remaining Rails 5.0 thru 6.0 deprecations #112

Merged
merged 2 commits into from
Oct 27, 2020

Conversation

chrisarcand
Copy link
Member

Description

Removes the remaining deprecation warnings that make their way in to CI output in all supported versions of Rails.

@chrisarcand chrisarcand requested a review from radditude October 27, 2020 16:40
Fixes deprecation warning:

DEPRECATION WARNING: Leaving `ActiveRecord::ConnectionAdapters::SQLite3Adapter.represent_boolean_as_integer`
set to false is deprecated. SQLite databases have used 't' and 'f' to serialize
boolean values and must have old data converted to 1 and 0 (its native boolean
serialization) before setting this flag to true. Conversion can be accomplished
by setting up a rake task which runs

  ExampleModel.where("boolean_column = 't'").update_all(boolean_column: 1)
  ExampleModel.where("boolean_column = 'f'").update_all(boolean_column: 0)

for all models and all boolean columns, after which the flag must be set to
true by adding the following to your application.rb file:

  Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true
@chrisarcand chrisarcand force-pushed the remove-remaining-rails-deprecations branch from c758db7 to 65b6933 Compare October 27, 2020 16:48
@chrisarcand chrisarcand merged commit 91228ba into master Oct 27, 2020
@chrisarcand chrisarcand deleted the remove-remaining-rails-deprecations branch October 27, 2020 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants