Commit c5cdd078 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add values to default fields to prevent 500 error when migrate from MySQL to Postgres

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 9a02e27b
No related merge requests found
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment