Does it make sense to store a SQLite database in version control?

language-agnostic, sqlite, version-control

Solution

Instead of storing the binary file for the SQLite database you should store the source material - either some XML/CSV/... file, or SQL file containing the insert statements.

This way you will get proper support for merging and viewing history/comparing (which does not really work for binary files, only text files).

Problem

I'm exploring the option of using SQLite as a database to store resources (mostly key value pairs) that are only necessary during the development process. This database would never be accessed directly in production or any other environment. A custom application would be used to generate multiple static resources based off the content in this database. I would like to keep a history of changes to this database, so storing in version control seems like a good idea since I would get that for free. My question is would this make sense using SQLite? Or is there a more appropriate alternative?

Original source