首页 > 其他 > 详细

django makemigrations的一个特性

时间:2016-06-14 23:35:37      阅读:266      评论:0      收藏:0      [点我收藏+]

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则不会。

django makemigrations的一个特性

原文:http://www.cnblogs.com/wswang/p/5585663.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!