diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-01-03 11:19:08 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-01-03 11:19:08 +0000 |
commit | 9c561f912435d92a21afcfe07bac6a3cf9d462ba (patch) | |
tree | 4a6360efbcb3d39f90907abacc246b5ae153b3bf /db/migrate/091_change_changesets_revision_to_string.rb | |
parent | 3218b8204c09832f3e8ea0ac3cac6c6b57b27d95 (diff) | |
download | redmine-9c561f912435d92a21afcfe07bac6a3cf9d462ba.tar.gz redmine-9c561f912435d92a21afcfe07bac6a3cf9d462ba.zip |
SQLServer does not support changing the type of an indexed column (#12713).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11097 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db/migrate/091_change_changesets_revision_to_string.rb')
-rw-r--r-- | db/migrate/091_change_changesets_revision_to_string.rb | 4 |
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 |