Steps to reproduce:
rails new hippo --database=postgresql
- edit gemfile to add fx,
bundle install
bundle exec rails generate fx:function square
- edit the function definition file
bundle exec rake db:create db:migrate
(this writes the initial function definition to schema.rb)
Up to this point, everything is fine. However, if we use db:schema:load
, fx will
read the function definition from schema.rb and recreate the function with 6 spaces
within the function definition itself.
Then whenever the schema is dumped again, such as after running db:migrate
for other
migrations, the function definition will be written to schema.rb with the internal
spaces as well as the formatting spaces, for a total of 12 spaces: