Defect #26

sqlite3 exception in db:migrate on AddChangesetCommitDate file when upgrading to last trunk

Added by Nicolas Chuche over 15 years ago. Updated over 15 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Resolution: Affected version:


When trying to upgrade to the last trunk db:migrate aborts with this message :

% rake db:migrate --trace
(in /home/nc/travail/rails/redmine)
  • Invoke db:migrate (first_time)
  • Invoke environment (first_time)
  • Execute environment
  • Execute db:migrate
    AddChangesetCommitDate: migrating ========================================
    -- add_column(:changesets, :commit_date, :date, {:null=>false})
    rake aborted!
    SQLite3::SQLException: Cannot add a NOT NULL column with default value NULL: ALTER TABLE changesets ADD
    "commit_date" date NOT NULL
    /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract_adapter.rb:128:in `log'

Two choices :
- allow NULL date
- set a default date


#1 Updated by Jean-Philippe Lang over 15 years ago

The migration script is fixed, NULL is now allowed.


Also available in: Atom PDF