So that we help developers even more, when writing migrations, output the migration code after it has been run.
Since the migration code is typically small, we could output it straight after the migration has run, and save you going to open that file, if it has successfully added the field (in this instance).
Also happy to implement, with tests. Would love to do it mob programming style and involve as many rubyists as possible. But first, is it good rails thinking?
That’s a fun idea. One thing I have often wished for, along these lines, was an option to immediately open the resulting migration in my editor, since I often need to make further adjustments after generating the raw migration (setting defaults and null options, for example). I would love to have an --edit / -e option to throw in there that would pipe the resulting file into my editor and save me some mousing.
I do not have a strong opinion on how much this will be useful. But personally, I do not find it hard to double click the generated migration file name on the terminal and just cat it or open in the editor.