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