##// END OF EJS Templates
Don't create duplicate wikis in test (#15420)....
Don't create duplicate wikis in test (#15420). Patch by George Gensure. git-svn-id: http://svn.redmine.org/redmine/trunk@12317 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r10907:cc47ccb1c2a5
r12086:8a1f26617d23
Show More
091_change_changesets_revision_to_string.rb
32 lines | 1.4 KiB | text/x-ruby | RubyLexer
/ db / migrate / 091_change_changesets_revision_to_string.rb
Jean-Philippe Lang
Merged Git support branch (r1200 to r1226)....
r1222 class ChangeChangesetsRevisionToString < ActiveRecord::Migration
def self.up
Jean-Philippe Lang
Check if index exists before removing it (#12713)....
r10907 # Some backends (eg. SQLServer 2012) do not support changing the type
# of an indexed column so the index needs to be dropped first
# BUT this index is renamed with some backends (at least SQLite3) for
# some (unknown) reasons, thus we check for the other name as well
# so we don't end up with 2 identical indexes
if index_exists? :changesets, [:repository_id, :revision], :name => :changesets_repos_rev
remove_index :changesets, :name => :changesets_repos_rev
end
if index_exists? :changesets, [:repository_id, :revision], :name => :altered_changesets_repos_rev
remove_index :changesets, :name => :altered_changesets_repos_rev
end
Jean-Philippe Lang
Merged Git support branch (r1200 to r1226)....
r1222 change_column :changesets, :revision, :string, :null => false
Jean-Philippe Lang
Check if index exists before removing it (#12713)....
r10907
Jean-Philippe Lang
SQLServer does not support changing the type of an indexed column (#12713)....
r10867 add_index :changesets, [:repository_id, :revision], :unique => true, :name => :changesets_repos_rev
Jean-Philippe Lang
Merged Git support branch (r1200 to r1226)....
r1222 end
def self.down
Jean-Philippe Lang
Check if index exists before removing it (#12713)....
r10907 if index_exists? :changesets, :changesets_repos_rev
remove_index :changesets, :name => :changesets_repos_rev
end
if index_exists? :changesets, [:repository_id, :revision], :name => :altered_changesets_repos_rev
remove_index :changesets, :name => :altered_changesets_repos_rev
end
Jean-Philippe Lang
Merged Git support branch (r1200 to r1226)....
r1222 change_column :changesets, :revision, :integer, :null => false
Jean-Philippe Lang
Check if index exists before removing it (#12713)....
r10907
Jean-Philippe Lang
SQLServer does not support changing the type of an indexed column (#12713)....
r10867 add_index :changesets, [:repository_id, :revision], :unique => true, :name => :changesets_repos_rev
Jean-Philippe Lang
Merged Git support branch (r1200 to r1226)....
r1222 end
end