Mind Dump, Tech And Life Blog
written by Ivan Alenko
published under license Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)copy! share!
posted at 24. Aug '21
last updated at 02. Feb '22

Rails 6/Rails 7 Generate Polymorphic Migration For Named Database

--db option, must be at the end of the command, after the attributes. The same applies on rails g migration

bin/rails g model PrivateImage private_imageable:references{polymorphic} body:blob metadata:jsonb --db oni_sorceress

bad:

bin/rails g model --db oni_sorceress PrivateImage private_imageable:references{polymorphic} body:blob metadata:jsonb

No value provided for required arguments 'name'

Add Comment