Easily Stream ChatGPT Responses with Rails 7, Turbostream, Tailwind and Sidekiq (twitter.com) 2 points by strudey 3y ago ↗ HN
[–] Alifatisk 3y ago ↗ Could you add the commands you used to generate the migrations? [–] strudey 3y ago ↗ 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...
[–] strudey 3y ago ↗ 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...
2 comments
[ 3.0 ms ] story [ 20.8 ms ] threadhttps://gist.github.com/alexrudall/cb5ee1e109353ef358adb4e66...