scm: add "extra_info" column to repositories table and set serialize (#7146, #7047).

This column is for specific SCM.
Git 7 days problem (#7146) can not resolve unless storing branches info in database.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5762 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-05-12 17:29:18 +00:00
parent 3e2a67be4f
commit 30aecd5e25
2 changed files with 11 additions and 0 deletions

View File

@ -22,6 +22,8 @@ class Repository < ActiveRecord::Base
has_many :changesets, :order => "#{Changeset.table_name}.committed_on DESC, #{Changeset.table_name}.id DESC"
has_many :changes, :through => :changesets
serialize :extra_info
# Raw SQL to delete changesets and changes in the database
# has_many :changesets, :dependent => :destroy is too slow for big repositories
before_destroy :clear_changesets

View File

@ -0,0 +1,9 @@
class AddRepositoriesExtraInfo < ActiveRecord::Migration
def self.up
add_column :repositories, :extra_info, :text
end
def self.down
remove_column :repositories, :extra_info
end
end