Search code examples
ruby-on-railsdatabase-schema

Deleting/keeping schema.rb after switching to structure.sql


Is there any point in keeping schema.rb after switching to structure.sql?

Or is it imperative that it should be deleted in order to avoid conflicts?


Solution

  • No, there is no point in keeping schema.rb.

    The purpose of schema.rb is to be the authoritive, up-to-date reference for the database schema which developers can use to setup the test and development environments. Once you switch the setting over to a SQL schema schema.rb will no longer be updated when migrations are run. Its then about as useful as last years bus schedule and will only cause confusion.