discourse-ai/db/migrate/20230316160714_create_completion_prompt_table.rb
Roman Rizzi 320ac6e84b
REFACTOR: Store prompts in a dedicated table. (#14)
This change makes it easier to add new prompts to our AI helper. We don't have a UI for it yet. You'll have to do it through a console.
2023-03-17 15:14:19 -03:00

16 lines
454 B
Ruby

# frozen_string_literal: true
class CreateCompletionPromptTable < ActiveRecord::Migration[7.0]
def change
create_table :completion_prompts do |t|
t.string :name, null: false
t.string :translated_name
t.integer :prompt_type, null: false, default: 0
t.text :value, null: false
t.boolean :enabled, null: false, default: true
t.timestamps
end
add_index :completion_prompts, %i[name], unique: true
end
end