What does “Migrating a Django application” mean?

后端 未结 2 1889
囚心锁ツ
囚心锁ツ 2021-01-05 05:57

I kept thinking a lot about the meaning of migrating a Django app the last few days and heard about migrating Django apps with django-south. Maybe it\'s just th

相关标签:
2条回答
  • 2021-01-05 06:39

    When it comes to talking about South and Django, a migration refers to changing the database schema.

    The syncdb command that is built into Django cannot automatically change schema for you without deleting everything first, which is why things like South and dmigrations have come about.

    So, essentially a migration is a way to alter your database schema while keeping your data intact.

    From the dmigrations page:

    With dmigrations, every change to your database (including the creation of your initial tables) is bundled up in a migration. Migrations are Python files that live in a migrations directory. They can be applied and un-applied (reverted) in sequence.

    0 讨论(0)
  • 2021-01-05 06:44

    Migrate typically refers to moving an application from one location to another. This translation can happen either via a physical movement. (Such as moving from one server to another), or as a more logical movement. (Such as from C# to F#)

    Given that only one technology is mentioned. It is likely primarily a physical movement application with a slight logical movement of the database side.

    To summarize what the application does. It likely simply exports all of your configuration and data to a file structure, which can then be reintegrated into your database on the new server.

    0 讨论(0)
提交回复
热议问题