Class: ErrorMigration

Inherits:
Object
  • Object
show all
Defined in:
lib/chatgpt_assistant/migrations.rb

Overview

Error model

Instance Method Summary collapse

Instance Method Details

#changeObject



82
83
84
85
86
87
88
89
90
91
92
# File 'lib/chatgpt_assistant/migrations.rb', line 82

def change
  return if ActiveRecord::Base.connection.table_exists? :errors

  create_table :errors do |t|
    t.integer :chat_id
    t.integer :user_id
    t.text :message, null: false, default: ""
    t.text :backtrace, null: false, array: true, default: []
    t.timestamps
  end
end