mirror of
https://github.com/discourse/discourse.git
synced 2025-03-24 03:35:43 +08:00
remove migration bombs
This commit is contained in:
parent
2a586d59e9
commit
ea1cd8dcd4
@ -1,6 +1,6 @@
|
|||||||
class AddScoresToTopTopics < ActiveRecord::Migration
|
class AddScoresToTopTopics < ActiveRecord::Migration
|
||||||
def change
|
def change
|
||||||
TopTopic.periods.each do |period|
|
[:daily, :weekly, :monthly, :yearly].each do |period|
|
||||||
add_column :top_topics, "#{period}_score".to_sym, :float
|
add_column :top_topics, "#{period}_score".to_sym, :float
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
class AddDefaultValueToTopTopicScores < ActiveRecord::Migration
|
class AddDefaultValueToTopTopicScores < ActiveRecord::Migration
|
||||||
def change
|
def change
|
||||||
TopTopic.periods.each do |period|
|
[:daily, :weekly, :monthly, :yearly].each do |period|
|
||||||
change_column_default :top_topics, "#{period}_score".to_sym, 0
|
change_column_default :top_topics, "#{period}_score".to_sym, 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user