mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
Add url hash index for stat_referrers
This commit is contained in:
parent
8a4bc57524
commit
334a9c019a
1 changed files with 13 additions and 0 deletions
13
migrations/067_add_missing_stat_indexes.rb
Normal file
13
migrations/067_add_missing_stat_indexes.rb
Normal 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
|
Loading…
Add table
Reference in a new issue