Project

General

Profile

Actions

Refactor #24838

closed

set "Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true" and migrate everything

Added by Anonymous over 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Database
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

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
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

Related issues 2 (0 open2 closed)

Related to Foreman - Tracker #21834: Rails 5.2 upgrade tasksClosed

Actions
Blocks Foreman - Tracker #24837: Rails 6.0 TrackerClosed

Actions
Actions #1

Updated by Anonymous over 5 years ago

Actions #2

Updated by Anonymous over 5 years ago

Actions #3

Updated by Anonymous almost 5 years ago

  • Tracker changed from Bug to Refactor
Actions #4

Updated by The Foreman Bot over 4 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Tomer Brisker
  • Pull request https://github.com/theforeman/foreman/pull/7171 added
Actions #5

Updated by The Foreman Bot over 4 years ago

  • Fixed in Releases 2.0.0 added
Actions #6

Updated by Tomer Brisker over 4 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF