diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-05-12 17:29:18 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-05-12 17:29:18 +0000 |
commit | 30aecd5e253863a5be330a9536dd6e1a19cfc9aa (patch) | |
tree | 53b2fbc54f0c41d709f7b818dbec73adc6b2f728 | |
parent | 3e2a67be4feacd70d1fa7fae96d8c2b0d9f85102 (diff) | |
download | redmine-30aecd5e253863a5be330a9536dd6e1a19cfc9aa.tar.gz redmine-30aecd5e253863a5be330a9536dd6e1a19cfc9aa.zip |
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
-rw-r--r-- | app/models/repository.rb | 2 | ||||
-rw-r--r-- | db/migrate/20110511000000_add_repositories_extra_info.rb | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index c2a15965d..47471ca92 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -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 diff --git a/db/migrate/20110511000000_add_repositories_extra_info.rb b/db/migrate/20110511000000_add_repositories_extra_info.rb new file mode 100644 index 000000000..a5280dc57 --- /dev/null +++ b/db/migrate/20110511000000_add_repositories_extra_info.rb @@ -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 |