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:
parent
e6f8897450
commit
c08a52e502
|
@ -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
|
Loading…
Reference in New Issue