先说结论:没区别.

从官方文档的意思来看,现在他已经成为migrate命令的同义词了,和migrate命令有相同的作用。

Deprecated since version 1.7: This command has been deprecated in favor of the migrate command, which performs both the old behavior as well as executing migrations. It is now just an alias to that command

  migrate命令的作用:

migrate [<app_label> [<migrationname>]]

django-admin migrate

New in Django 1.7.

Synchronizes the database state with the current set of models and migrations. Migrations, their relationship with apps and more are covered in depth in the migrations documentation.

The behavior of this command changes depending on the arguments provided:

  • No arguments: All migrated apps have all of their migrations run, and all unmigrated apps are synchronized with the database,
  • <app_label>: The specified app has its migrations run, up to the most recent migration. This may involve running other apps’ migrations too, due to dependencies.
  • <app_label> <migrationname>: Brings the database schema to a state where the named migration is applied, but no later migrations in the same app are applied. This may involve unapplying migrations if you have previously migrated past the named migration. Use the name zero to unapply all migrations for an app.

Unlike syncdb, this command does not prompt you to create a superuser if one doesn’t exist (assuming you are using django.contrib.auth). Use createsuperuser to do that if you wish.

The --database option can be used to specify the database to migrate.

--fake

The --fake option tells Django to mark the migrations as having been applied or unapplied, but without actually running the SQL to change your database schema.

This is intended for advanced users to manipulate the current migration state directly if they’re manually applying changes; be warned that using --fake runs the risk of putting the migration state table into a state where manual recovery will be needed to make migrations run correctly.

New in Django 1.8.

--fake-initial

The --fake-initial option can be used to allow Django to skip an app’s initial migration if all database tables with the names of all models created by all CreateModel operations in that migration already exist. This option is intended for use when first running migrations against a database that preexisted the use of migrations. This option does not, however, check for matching database schema beyond matching table names and so is only safe to use if you are confident that your existing schema matches what is recorded in your initial migration.

Deprecated since version 1.8: The --list option has been moved to the showmigrations command.

migrate和syncdb的区别(转载)相关推荐

  1. .NET 的 WCF 和 WebService 有什么区别?(转载)

    .NET 的 WCF 和 WebService 有什么区别?(转载) [0]问题: WCF与 Web Service的区别是什么? 和ASP.NET Web Service有什么关系? WCF与ASP ...

  2. oracle startup作用,【学习笔记】Oracle打补丁后startup migrate、startup upgrade区别分析...

    天萃荷净 分享一篇Oracle数据库在打完补丁后startup migrate.startup upgrade区别分析 1.为什么要使用Startup Migrate STARTUP MIGRATE ...

  3. postfix中recipient/client/sender/helo四者的区别转载

    postfix在main.cf中用下面四个做限制,那么这四者到底有什么区别? smtpd_recipient_restrictions smtpd_client_restrictions smtpd_ ...

  4. jquery和javascript的区别(转载自脚本之家)

    jquery 就对javascript的一个扩展,封装,就是让javascript更好用,更简单,为了说明区别,下面与大家分享下JavaScript 与JQuery 常用方法比较 jquery 就对j ...

  5. arm920T与arm926的区别[转载]

    ARM920(T)与ARM926(EJ-S)还是有不少区别的,粗的讲,前者基于ARMv4架构,后者基于ARM v5架构.其中,对于程序员来说,一个大的区别是,两者指令集不一样.926(ARM v5)新 ...

  6. php中this,self,parent三个关键字之间的区别(转载)

    PHP5是一具备了大部分面向对象语言的特性的语言,比PHP4有 了很多的面向对象的特性,但是有部分概念也比较难以理解,这里我主要谈的是 this,self,parent三个关键字之间的区别.从字面上比 ...

  7. varchar和Nvarchar区别 ----转载

    varchar和Nvarchar区别 Unicode字符集就是为了解决字符集这种不兼容的问题而产生的,它所有的字符都用两个字节表示,即英文字符也是用两个字节表示 如果还为了这个纠结,就直接看看后面的解 ...

  8. git fetch和git pull之间的区别--转载

    原文地址:http://blog.csdn.net/a19881029/article/details/42245955 git fetch和git pull都可以用来更新本地库,它们之间有什么区别呢 ...

  9. 静态方法和实例化方法的区别 -转载

    这是一个经常被时时提出来的问题,很多时候我们以为理解了.懂了,但深究一下,我们却发现并不懂. 方法是我们每天都在写得,很多程序员大多都使用实例化方法,而很少使用静态方法,问原因也说不出来所以然,或者简 ...

最新文章

  1. 国产海翼号水下滑翔机首次应用于北极科考
  2. Mac 技术篇-VS Code插件安装方法,查看vscode已安装插件的方法
  3. webservice axis1.4生成客户端
  4. freemarker该阵列
  5. boost::astar_search用法的测试程序
  6. java btrace_BTrace:Java开发人员工具箱中的隐藏宝石
  7. 重采样和重分类的区别
  8. linux判断网站被采集,网站被采集的几个处理方法(非技术)
  9. 《如何搭建小微企业风控模型》第十二节 模型检验 节选
  10. 软件工程java向量相似度计算_向量的相似度计算常用方法9个
  11. Java 初学记录之一 快速输入
  12. python 安卓库_Python 开发安卓Android及IOS应用库Kivy安装尝试
  13. 硬件中控一键开关机设计方案
  14. 再次深入分析不可重入函数---请小心使用localtime函数
  15. 什么是用户代理样式表
  16. HTML基础--标签VSCode常用快捷方式和插件
  17. 计算机二级虎贲跟未来教育那个好,考计算机二级的都看看,分享几款模拟软件...
  18. 英语口语练习三十二之英文口语中生病时该如何陈述症状
  19. UI设计师是做什么的?
  20. C++中的clock计时不准?

热门文章

  1. 道里云SDN云网络技术:使云能够“众筹”
  2. EqualsBuilder和HashCodeBuilder
  3. HTML5编程实战之二:用动画的形式切换图片
  4. Vue项目实战09 : vue3.0实现点击切换验证码(组件)及校验
  5. 老男孩python21期作业_(禁闲聊)绘画讨论10个群第176期作业展示
  6. restful API 常用的四种方式
  7. 欢迎使用Augury[翻译]
  8. 几个方便编程的C++特性
  9. finalshell连接失败解决方法_Windows 无法连接到SENS的解决方法
  10. [译]Hour 7 Teach.Yourself.WPF.in.24.Hours