Class: ChatMigration
- Inherits:
-
Object
- Object
- ChatMigration
- Defined in:
- lib/chatgpt_assistant/migrations.rb
Overview
Chat model
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/chatgpt_assistant/migrations.rb', line 51 def change return if ActiveRecord::Base.connection.table_exists? :chats create_table :chats do |t| t.references :user, null: false, foreign_key: true t.text :title, null: false, default: "", limit: 100 t.integer :status, null: false, default: 0 t.integer :messages_count, null: false, default: 0 t.string :actor t.text :prompt t. end end |