Add url hash index for stat_referrers

This commit is contained in:
Kyle Drake 2015-06-17 14:20:43 -07:00
parent 8a4bc57524
commit 334a9c019a

View file

@ -0,0 +1,13 @@
Sequel.migration do
up {
DB['create index stat_referrers_hash_multi on stat_referrers (site_id, md5(url))'].first
DB.add_index :stat_locations, :site_id
DB.add_index :stat_paths, :site_id
}
down {
DB['drop index stat_referrers_hash_multi'].first
DB.drop_index :stat_locations, :site_id
DB.drop_index :stat_paths, :site_id
}
end