Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.
Matijs van Zuijlen edited this page Feb 23, 2016 · 6 revisions

This is the wiki for memory_test_fix.

schema.rb vs. migrations

Should you use schema.rb or the migrations to initialize the in-memory database? schema.rb is the default and generally faster. Reasons for using migrate: true could be to help make sure your migrations don't break due to changes in the code elsewhere (whether this is useful depends on your use-case), or to make some seeding data be available. If those reasons don't apply, keeping it at the default is probably faster.

TL;DR: Use the default unless there's a clear reason not to. You can always switch later.

(adapted from issue #2)

History

Original idea and code: In memory sqlite database for rails testing by Chris Roos

Rails Plugin: San Francisco, Sqlite3 :memory: Tests, Asteroids (link no longer active) by topfunky.

Made into a GemPlugin by Matijs van Zuijlen

Clone this wiki locally