What is a migrate? [duplicate]

2

I'm a beginner in the django world and one of the first things I find in tutorials is the term migrate I'd like to know what that means, how to use it and what it's for.

    
asked by anonymous 02.02.2018 / 00:31

1 answer

1

Migrate (migration) is for you to manage the structure of your application's database tables, that is, through it you can include, change and delete tables or fields of a particular table, in an organized way, leaving all of these changes documented and preventing you from manually doing so.

In order to migrate, you need to generate a migrate file, and within it, we place one or more changes that need to be made to our database, and when you run that migration, those changes will be made automatically.

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

> Django Official Documentation on Migration

    
02.02.2018 / 01:01