summaryrefslogtreecommitdiffstats
path: root/db/migrate/091_change_changesets_revision_to_string.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/091_change_changesets_revision_to_string.rb')
-rw-r--r--db/migrate/091_change_changesets_revision_to_string.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/db/migrate/091_change_changesets_revision_to_string.rb b/db/migrate/091_change_changesets_revision_to_string.rb
index e621a3909..6e451efbb 100644
--- a/db/migrate/091_change_changesets_revision_to_string.rb
+++ b/db/migrate/091_change_changesets_revision_to_string.rb
@@ -1,9 +1,13 @@
class ChangeChangesetsRevisionToString < ActiveRecord::Migration
def self.up
+ remove_index :changesets, :name => :changesets_repos_rev
change_column :changesets, :revision, :string, :null => false
+ add_index :changesets, [:repository_id, :revision], :unique => true, :name => :changesets_repos_rev
end
def self.down
+ remove_index :changesets, :name => :changesets_repos_rev
change_column :changesets, :revision, :integer, :null => false
+ add_index :changesets, [:repository_id, :revision], :unique => true, :name => :changesets_repos_rev
end
end