DEV: Clean up old polls data from custom fields

In early 2015, the poll plugin was writing its data to custom fields on
the post containing the poll. It was later changed to have dedicated SQL
tables and the polls were migrated but we forgot to clean the existing
data.
This commit is contained in:
Loïc Guitaut 2023-06-12 16:01:26 +02:00 committed by Loïc Guitaut
parent e6f8897450
commit c08a52e502
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
# frozen_string_literal: true
class RemoveOldPollsDataFromCustomFields < ActiveRecord::Migration[7.0]
def up
execute <<~SQL
DELETE FROM post_custom_fields
WHERE name LIKE 'polls%'
SQL
end
def down
end
end