Also, it’s not just about the code: the database too should have a fully functional version control system in order to keep track of all the updates and facilitate a new member in your team.
Well, the migrations system is here to help. You can see it as a version control system for your database, which is made up of many files. Every single one of these files is a class with the two methods:
down(). In the
up() method, you will put all of your database construction logic. In the
down() method, instead, you will put anything related to rolling back what you did in the