mirror of
https://github.com/meineerde/redmine.git
synced 2026-03-11 03:33:07 +00:00
Force the default value of path to be set on the Change model class. This is needed because MySQL does not support default values on text columns (Error introduced in r3828, #5771)
This commit is contained in:
parent
75d5ab431f
commit
89cb1b9c8b
@ -23,4 +23,8 @@ class Change < ActiveRecord::Base
|
||||
def relative_path
|
||||
changeset.repository.relative_path(path)
|
||||
end
|
||||
|
||||
def before_save
|
||||
path ||= ""
|
||||
end
|
||||
end
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
class ChangeChangesPathLengthLimit < ActiveRecord::Migration
|
||||
def self.up
|
||||
change_column :changes, :path, :text, :default => "", :null => false
|
||||
change_column :changes, :path, :text, :null => false
|
||||
change_column :changes, :from_path, :text
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user