Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Setting schema_format in config/environments/test.rb does not work

#2857

The application skeleton generated by rails suggests that the schema format can and should be set in config/environments/test.rb. This doesn't work, unfortunately. Currently, config.active_record.schema_format has to be set in config/environment.rb (or presumably config/environments/development.rb) in order to have an effect.

As far as I can tell, rake test runs in the development environment and that is what the tasks in database.rake apparently assume anyway. Only very late in the process when railties/lib/test_help.rb is loaded from test_helper.rb, the environment is switched to test.

As the schema format is an application-wide setting anyway, I suggest to move the relevant boilerplate from the test.rb template to the environment.rb template.

Reported by Michael Schuerig · June 30th, 2009 @ 04:23 PM

State: hold
Milestone: 3.0.2
Assigned to: Yehuda Katz (wycats) Yehuda Katz (wycats)
Importance: none

Activity

  1. Yehuda Katz (wycats)
    Yehuda Katz (wycats)
    • Tag changed from railties, schema_format to initializer, railties, schema_format
    • Milestone cleared.
    • Assigned user set to Yehuda Katz (wycats)

    We're in the process of cleaning up the initializer so we'll take a look at this in the next few days.

    July 1st, 2009 @ 07:28 PM

  2. Yehuda Katz (wycats)
    Yehuda Katz (wycats)
    • State changed from new to hold

    July 1st, 2009 @ 11:40 PM

  3. Jeremy Kemper
    Jeremy Kemper
    • Milestone set to 3.0.2
    • Importance changed from to

    October 15th, 2010 @ 11:01 PM