skip to content »

Anathema updating equipment database

Problems arise when your software starts operating in production or a new team member joins you to work on database-related parts of your project.

Best practice #4: all changes in the database’s schema and reference data have to be applied through the scripts. If we modify the database passing over our scripts, the whole idea of database versioning becomes worthless, so we need to make sure the changes are made only via the SQL scripts we create.

Best practice #5: every developer in the team should have their own database instance.

All the changes in it are tracked by the source control system itself, they are not stored explicitly.

Moreover, often the changes in the reference data are not tracked at all.

This means that for every modification we make we should create a separate SQL script with the changes.

Keeping track of your application’s database is not an easy task.

anathema updating equipment database-55anathema updating equipment database-42anathema updating equipment database-48

While this may work well in small projects, in larger projects, tracking changes in the database using auto-generated scripts becomes a burden.Often, teams start with a single database in the developer environment.That works well at the beginning but when the database grows large enough, simultaneous modifications of it become harder and harder until at some point stop working at all.Best practice #1: we need to treat the application database and the reference data in it as regular code.That means we should store both its schema and the reference data in a source control system.You just change your DB schema the way you want and it always works.