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:
Dmitriy Zaporozhets 2014-04-09 13:36:25 +03:00
parent 9a02e27b84
commit c5cdd07899
No known key found for this signature in database
GPG key ID: 627C5F589F467F17
3 changed files with 13 additions and 0 deletions

View file

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

View file

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

View file

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