The first time db:migrate is run, it creates a file called db/development.sqlite3, which is an SQLite5 database. It is possible to see the structure of the database by opening development.sqlite3 with DB Browser for SQLite. Supposedly, db/development.sqlite3 is updated every time db:migrate is run.
However one possible scenario is that db:migrate is run in a topic branch, and a new db/development.sqlite3 file is created in that branch. Then the topic branch is deleted. The database is modified but the corresponding db/development.sqlite3 file in the master branch remains unchanged. In this case, db/development.sqlite3 cannot provide updated information.
Is there any other, more reliable and straightforward way to inspect a database structure both in a development and production environments in any point in time?
Aucun commentaire:
Enregistrer un commentaire