What is a migrate?

Asked

Viewed 664 times

2

I am a beginner in the world of Jango and one of the first things I find in tutorials is the term migrate I’d like to know what that refers to, how to use it and what it’s for.

1 answer

1


The "migrate" (migration) serves for you to manage the structure of the tables of the database of your application, that is, through it it is possible to include, change and delete tables or fields of a given table, in an organized way, leaving all these changes documented and preventing you from doing it manually.

To make a migration you need to generate a migrate file, and inside it, we put one or more changes that need to be made in our database, and when you run this migration, these changes will be made automatically.

Migrations are enumerated increasingly, and it is possible to return to the desired number, that is, you can undo it at any time, and return your database to the previous state of any migration.

Official Documentation on Migration in Django

Browser other questions tagged

You are not signed in. Login or sign up in order to post.