1 class AddHashedPathToRepositories < ActiveRecord::Migration
4 add_column :repositories, :hashed_path, :string
5 add_index :repositories, :hashed_path
7 Repository.reset_column_information
9 Repository.all.each do |repo|
10 repo.update_attribute(:hashed_path, repo.send(:set_repository_hash))
12 say "\e[1;31m===> Now go and run script/shard_git_repositories_by_hash as the #{Gitorious.user} user <===\e[0m"
17 remove_column :repositories, :hashed_path