mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
16 lines
521 B
Ruby
16 lines
521 B
Ruby
# This migration detaches stat_referrers, stat_locations and stat_paths
|
|
# from stats. Instead of stat_id, we'll add a created_at timestamp and remove
|
|
# after 7 days for both free and supporter plans (for now).
|
|
Sequel.migration do
|
|
up {
|
|
[:stat_referrers, :stat_paths, :stat_locations].each do |stat_table|
|
|
add_column stat_table, :site_id, :integer, index: true
|
|
end
|
|
}
|
|
|
|
down {
|
|
[:stat_referrers, :stat_paths, :stat_locations].each do |stat_table|
|
|
drop_column stat_table, :site_id
|
|
end
|
|
}
|
|
end
|