mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 00:54:21 +08:00
f91ac52a22
Co-authored-by: Loïc Guitaut <loic@discourse.org>
15 lines
251 B
Ruby
15 lines
251 B
Ruby
# frozen_string_literal: true
|
|
|
|
class DropInvalidDrafts < ActiveRecord::Migration[7.0]
|
|
def up
|
|
execute <<~SQL
|
|
DELETE FROM drafts
|
|
WHERE LENGTH(data) > 400000
|
|
SQL
|
|
end
|
|
|
|
def down
|
|
raise ActiveRecord::IrreversibleMigration
|
|
end
|
|
end
|