Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Handling schema.rb in version control

See original GitHub issue

It is generally recommended to commit schema.rb file along with other file systems as mentioned here Will it be a good idea to remove it from .gitignore and commit it for our project too?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

armudgalcommented, Mar 10, 2019

@ankitkataria We are.

tachyonscommented, Mar 9, 2019

Yes, it is the recommended practice, but it is impossible to have schema.rb in version control since we support two databases at the moment. We can add them once we drop mysql support

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the right approach to deal with Rails db/schema.rb file ...
Your database schema absolutely is a critical artifact and anything that important needs to be tracked in revision control. Any update/merge ...
Read more >
How To Handle schema.rb Conflicts During git rebase in Rails ...
The robust approach is to rebuild the schema at each stage as follows: Before rebasing, checkout (and pull!) master and ensure that the...
Read more >
How to Keep Your schema.rb Files Clean & Consistent
The schema version in schema.rb must always go up. It should never be either left untouched or going back in time. Taking these...
Read more >
Tracking Database Schema And Schema Migrations In Git ...
Ben Nadel discusses tracking database schema and database schema migrations (DDLs and DMLs) in version control. This is a practice that is ...
Read more >
Resolving a schema conflict during rebase in Rails
One important details about schema.rb : it should not be manually edited and it relies on a versioning system.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found