feat: add Captain::Scenario Model and API [CW-4597] (#11907)

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
Shivam Mishra
2025-07-14 16:12:38 +05:30
committed by GitHub
parent d89fa09359
commit 93f18315cc
15 changed files with 505 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
class CreateCaptainScenarios < ActiveRecord::Migration[7.1]
def change
create_table :captain_scenarios do |t|
t.string :title
t.text :description
t.text :instruction
t.jsonb :tools, default: []
t.boolean :enabled, default: true, null: false
t.references :assistant, null: false
t.references :account, null: false
t.timestamps
end
add_index :captain_scenarios, :enabled
add_index :captain_scenarios, [:assistant_id, :enabled]
end
end