Project

General

Profile

Bug #28551

sqlite db migration fails with Cannot add a NOT NULL column with default value NULL:

Added by Justin Sherrill 5 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

StandardError: An error has occurred, this and all later migrations canceled:
SQLite3::SQLException: Cannot add a NOT NULL column with default value NULL: ALTER TABLE "katello_distribution_references" ADD "repository_id" integer NOT NULL
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:91:in `initialize'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:91:in `new'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:91:in `prepare'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:137:in `execute'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:255:in `block (2 levels) in execute'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:254:in `block in execute'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:579:in `block (2 levels) in log'
/opt/rh/rh-ruby25/root/usr/share/ruby/monitor.rb:226:in `mon_synchronize'

Associated revisions

Revision cd83eb38 (diff)
Added by Justin Sherrill 5 months ago

Fixes #28551 - use sqlite friendly not_null add_column

History

#1 Updated by The Foreman Bot 5 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/8483 added

#2 Updated by The Foreman Bot 5 months ago

  • Fixed in Releases Katello 3.15.0 added

#3 Updated by Justin Sherrill 5 months ago

  • Status changed from Ready For Testing to Closed

#4 Updated by Jonathon Turel 5 months ago

  • Triaged changed from No to Yes

Also available in: Atom PDF