News for hackers. Stuff that matters.
Re:Easily Stream ChatGPT Responses with Rails 7, Turbostream... by Alifatisk on Thursday April 27, 2023 @05:29AM (#35725475)
Could you add the commands you used to generate the migrations?
Re:Easily Stream ChatGPT Responses with Rails 7, Turbostream... by strudey on Thursday April 27, 2023 @06:13AM (#35725841)
Yeah, added :)

  bin/rails generate migration CreateChats user:references
  bin/rails generate migration CreateMessages chat:references role:integer content:string
Will need to add null: false and default: 0 on the enum manually if you so desire as Rails apparently doesn't support generating with those options.

https://gist.github.com/alexrudall/cb5ee1e109353ef358adb4e66...