Class: MigrateLlmUuidToPromptExecutions

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/llm_meta_client/scaffold/templates/db/migrate/migrate_llm_uuid_to_prompt_executions.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
# File 'lib/generators/llm_meta_client/scaffold/templates/db/migrate/migrate_llm_uuid_to_prompt_executions.rb', line 2

def change
  add_column :prompt_navigator_prompt_executions, :llm_uuid, :string unless column_exists?(:prompt_navigator_prompt_executions, :llm_uuid)
  remove_column :chats, :llm_uuid, :string if column_exists?(:chats, :llm_uuid)
  remove_column :chats, :model, :string if column_exists?(:chats, :model)
end