Add values to default fields to prevent 500 error when migrate from MySQL to Postgres
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
9a02e27b84
commit
c5cdd07899
3 changed files with 13 additions and 0 deletions
|
@ -23,6 +23,8 @@ require 'file_size_validator'
|
|||
class Note < ActiveRecord::Base
|
||||
include Mentionable
|
||||
|
||||
default_value_for :system, false
|
||||
|
||||
attr_accessible :note, :noteable, :noteable_id, :noteable_type, :project_id,
|
||||
:attachment, :line_code, :commit_id
|
||||
attr_mentionable :note
|
||||
|
|
|
@ -29,6 +29,12 @@ class Project < ActiveRecord::Base
|
|||
extend Enumerize
|
||||
|
||||
default_value_for :archived, false
|
||||
default_value_for :issues_enabled, true
|
||||
default_value_for :wall_enabled, false
|
||||
default_value_for :merge_requests_enabled, true
|
||||
default_value_for :wiki_enabled, true
|
||||
default_value_for :snippets_enabled, false
|
||||
default_value_for :imported, false
|
||||
|
||||
ActsAsTaggableOn.strict_case_match = true
|
||||
|
||||
|
|
|
@ -49,6 +49,11 @@ require 'carrierwave/orm/activerecord'
|
|||
require 'file_size_validator'
|
||||
|
||||
class User < ActiveRecord::Base
|
||||
default_value_for :admin, false
|
||||
default_value_for :can_create_group, true
|
||||
default_value_for :can_create_team, false
|
||||
default_value_for :hide_no_ssh_key, false
|
||||
|
||||
devise :database_authenticatable, :token_authenticatable, :lockable, :async,
|
||||
:recoverable, :rememberable, :trackable, :validatable, :omniauthable, :confirmable, :registerable
|
||||
|
||||
|
|
Loading…
Reference in a new issue