discourse/plugins/discourse-post-voting/db/migrate/20230908045625_drop_question_answer_tables.rb
2025-07-15 16:38:05 +02:00

19 lines
458 B
Ruby

# frozen_string_literal: true
require "migration/table_dropper"
class DropQuestionAnswerTables < ActiveRecord::Migration[7.0]
def up
if table_exists?(:question_answer_votes)
Migration::TableDropper.execute_drop(:question_answer_votes)
end
if table_exists?(:question_answer_comments)
Migration::TableDropper.execute_drop(:question_answer_comments)
end
end
def down
raise ActiveRecord::IrreversibleMigration
end
end