Class: MessageMigration
- Inherits:
-
Object
- Object
- MessageMigration
- Defined in:
- lib/chatgpt_assistant/migrations.rb
Overview
Message model
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
68 69 70 71 72 73 74 75 76 77 |
# File 'lib/chatgpt_assistant/migrations.rb', line 68 def change return if ActiveRecord::Base.connection.table_exists? :messages create_table :messages do |t| t.references :chat, null: false, foreign_key: true t.integer :role, null: false, default: 0 t.text :content, null: false, default: "" t. end end |