discourse-ai/db/migrate/20241206030229_add_ai_moder...

16 lines
480 B
Ruby
Raw Normal View History

2024-12-11 17:17:25 -05:00
# frozen_string_literal: true
class AddAiModerationSettings < ActiveRecord::Migration[7.2]
def change
create_enum :ai_moderation_setting_type, %w[spam nsfw custom]
create_table :ai_moderation_settings do |t|
t.enum :setting_type, enum_type: "ai_moderation_setting_type", null: false
t.jsonb :data, default: {}
t.bigint :llm_model_id, null: false
t.timestamps
end
add_index :ai_moderation_settings, :setting_type, unique: true
end
end