0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-14 13:58:53 +08:00
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
Vendored

# 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