MigrationPatchr1709.patch

Chris Taylor, 2008-07-29 21:43

Download (1.53 KB)

View differences:

db/migrate/091_change_changesets_revision_to_string.rb (working copy)
1 1
class ChangeChangesetsRevisionToString < ActiveRecord::Migration
2 2
  def self.up
3
    remove_index :changesets, :name => :changesets_repos_rev
3 4
    change_column :changesets, :revision, :string, :null => false
5
    add_index :changesets, [:repository_id, :revision], :unique => true, :name => :changesets_repos_rev
6
    
4 7
  end
5 8

  
6 9
  def self.down
10
    remove_index :changesets, :name => :changesets_repos_rev
7 11
    change_column :changesets, :revision, :integer, :null => false
12
    add_index :changesets, [:repository_id, :revision], :unique => true, :name => :changesets_repos_rev
13

  
8 14
  end
9 15
end
db/migrate/092_change_changes_from_revision_to_string.rb (working copy)
1 1
class ChangeChangesFromRevisionToString < ActiveRecord::Migration
2 2
  def self.up
3
    change_column :changes, :from_revision, :string
3
    change_column :changes, :from_revision, :string, :default => nil
4 4
  end
5 5

  
6 6
  def self.down
7
    change_column :changes, :from_revision, :integer
7
    change_column :changes, :from_revision, :integer, :default => nil
8 8
  end
9 9
end