@@ -0,0 +1,9 | |||||
|
1 | class AddRepositoriesExtraInfo < ActiveRecord::Migration | |||
|
2 | def self.up | |||
|
3 | add_column :repositories, :extra_info, :text | |||
|
4 | end | |||
|
5 | ||||
|
6 | def self.down | |||
|
7 | remove_column :repositories, :extra_info | |||
|
8 | end | |||
|
9 | end |
@@ -22,6 +22,8 class Repository < ActiveRecord::Base | |||||
22 | has_many :changesets, :order => "#{Changeset.table_name}.committed_on DESC, #{Changeset.table_name}.id DESC" |
|
22 | has_many :changesets, :order => "#{Changeset.table_name}.committed_on DESC, #{Changeset.table_name}.id DESC" | |
23 | has_many :changes, :through => :changesets |
|
23 | has_many :changes, :through => :changesets | |
24 |
|
24 | |||
|
25 | serialize :extra_info | |||
|
26 | ||||
25 | # Raw SQL to delete changesets and changes in the database |
|
27 | # Raw SQL to delete changesets and changes in the database | |
26 | # has_many :changesets, :dependent => :destroy is too slow for big repositories |
|
28 | # has_many :changesets, :dependent => :destroy is too slow for big repositories | |
27 | before_destroy :clear_changesets |
|
29 | before_destroy :clear_changesets |
General Comments 0
You need to be logged in to leave comments.
Login now