Parcourir la source

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
tags/1.2.0
Toshi MARUYAMA il y a 13 ans
Parent
révision
30aecd5e25

+ 2
- 0
app/models/repository.rb Voir le fichier

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

+ 9
- 0
db/migrate/20110511000000_add_repositories_extra_info.rb Voir le fichier

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

Chargement…
Annuler
Enregistrer