mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-03 00:20:04 +08:00
19 lines
458 B
Ruby
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
|