zoukankan      html  css  js  c++  java
  • django makemigrations的一个特性

    Migrations will run the same way on the same dataset and produce consistent results, meaning that what you see in development and staging is, under the same circumstances, exactly what will happen in production.

    Django will make migrations for any change to your models or fields - even options that don’t affect the database - as the only way it can reconstruct a field correctly is to have all the changes in the history, and you might need those options in some data migrations later on (for example, if you’ve set custom validators).

    自带的migrate会把所有改动都生成migrations.py,即使对数据库没有影响的改动。

    而以前版本的south则不会。

  • 相关阅读:
    第四章5
    第四章4
    第四章3
    第四章2
    第四章1
    第四章例4-8
    第四章例4-7
    第四章例4-6
    第四章例4-5
    第四章例4-4
  • 原文地址:https://www.cnblogs.com/wswang/p/5585663.html
Copyright © 2011-2022 走看看