mirror of
https://github.com/discourse/discourse-solved.git
synced 2025-02-10 13:44:43 +00:00
This commit promotes all post_deploy migrations which existed in Discourse v2.8.0 (timestamp <= 20220107014925)
25 lines
572 B
Ruby
25 lines
572 B
Ruby
# frozen_string_literal: true
|
|
|
|
class RemoveNilCustomFieldsFromSolved < ActiveRecord::Migration[6.0]
|
|
def up
|
|
execute <<~SQL
|
|
DELETE FROM post_custom_fields
|
|
WHERE name = 'is_accepted_answer' AND value IS NULL
|
|
SQL
|
|
|
|
execute <<~SQL
|
|
DELETE FROM topic_custom_fields
|
|
WHERE name = 'accepted_answer_post_id' AND value IS NULL
|
|
SQL
|
|
|
|
execute <<~SQL
|
|
DELETE FROM topic_custom_fields
|
|
WHERE name = 'solved_auto_close_topic_timer_id' AND value IS NULL
|
|
SQL
|
|
end
|
|
|
|
def down
|
|
raise ActiveRecord::IrreversibleMigration
|
|
end
|
|
end
|