@@ -1,9 +1,13 | |||||
1 | class ChangeChangesetsRevisionToString < ActiveRecord::Migration |
|
1 | class ChangeChangesetsRevisionToString < ActiveRecord::Migration | |
2 | def self.up |
|
2 | def self.up | |
|
3 | remove_index :changesets, :name => :changesets_repos_rev | |||
3 | change_column :changesets, :revision, :string, :null => false |
|
4 | change_column :changesets, :revision, :string, :null => false | |
|
5 | add_index :changesets, [:repository_id, :revision], :unique => true, :name => :changesets_repos_rev | |||
4 | end |
|
6 | end | |
5 |
|
7 | |||
6 | def self.down |
|
8 | def self.down | |
|
9 | remove_index :changesets, :name => :changesets_repos_rev | |||
7 | change_column :changesets, :revision, :integer, :null => false |
|
10 | change_column :changesets, :revision, :integer, :null => false | |
|
11 | add_index :changesets, [:repository_id, :revision], :unique => true, :name => :changesets_repos_rev | |||
8 | end |
|
12 | end | |
9 | end |
|
13 | end |
General Comments 0
You need to be logged in to leave comments.
Login now