This minimal Rails application outlines a bug when generating db/schema.rb
and with virtual/generated columns.
- Create a table (
syncs
in this example). - Add a virtual column to the table using a newly generated migration.
bin/rails db:migrate
to migrate the DB and updatedb/schema.rb
. At this pointdb/schema.rb
is correct.bin/rails db:prepare
. This changes the virtual column indb/schema.rb
, making it as aboolean
column, not avirtual type: :boolean
column.