YII Framework框架使用YIIC快速创建YII应用之migrate用法实例详解

发布时间:2022-04-30 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了YII Framework框架使用YIIC快速创建YII应用之migrate用法实例详解脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

本文实例讲述了YII Framework框架使用yiic快速创建YII应用之migrate用法分享给大家供大家参考,具体如下:

yii migrate

查看帮助

<PRe class="brush:PHP;"> /* /www/yii_dev/yii/framework# PHP yiic migrate help Error: UnkNown action: help usage yiic migrate [action] [parameter] DESCRIPTION This command provides support for database migrations. The optional 'action' parameter sPEcifies which specific migration task to perform. IT can take these values: up,down,to,create,history,new,mark. If the 'action' parameter is not given,it defaults to 'up'. each action takes different parameters. Their usage can be found in the following examples.

EXAMPLES

  • yiic migrate
    Applies ALL new migrations. This is equivalent to 'yiic migrate to'.
  • yiic migrate create create_user_table
    Creates a new migration named 'create_user_table'.
  • yiic migrate up 3
    Applies the next 3 new migrations.
  • yiic migrate down
    reverts the last applied migration.
  • yiic migrate down 3
    Reverts the last 3 applied migrations.
  • yiic migrate to 101129_185401
    Migrates up or down to version 101129_185401.
  • yiic migrate mark 101129_185401
    Modifies the migration history up or down to version 101129_185401.
    No actual migration will be performed.
  • yiic migrate history
    Shows all prevIoUsly applied migration information.
  • yiic migrate history 10
    Shows the last 10 applied migrations.
  • yiic migrate new
    Shows all new migrations.
  • yiic migrate new 10
    Shows the next 10 migrations that have not been applied.
    */

脚本宝典总结

以上是脚本宝典为你收集整理的YII Framework框架使用YIIC快速创建YII应用之migrate用法实例详解全部内容,希望文章能够帮你解决YII Framework框架使用YIIC快速创建YII应用之migrate用法实例详解所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。