Download the PHP package ke/thinkphp-migration without Composer

On this page you can find all versions of the php package ke/thinkphp-migration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package thinkphp-migration

thinkphp-migration

**要求ThinkPHP 5.1.***

本扩展与官方的区别是什么?

支持最新的phinx扩展,直接composer更新而不是固定死版本

为什么不直接使用phinx包?因为使用命令需要vendor\bin\phinx,还有配置文件也要自定义,本扩展已支持加载tp的数据库配置

由于tp内置的命令行选项是2个-的,所以我们的命令都会成 php think migrate:run --e dev 这样子的选项

安装

Config 配置文件

Breakpoint 命令

Breakpoint 命令用来设置断点,可以使你对回滚进行限制。你可以调用 breakpoint 命令不带任何参数,也就是断点设在最新的迁移脚本上

可以使用 --t 来指定断点打到哪个迁移版本上

可以使用 --r 来移除所有断点

当你运行 status 命令时可以看到断点信息

Create 命令

create 命令用来创建迁移脚本文件。需要一个参数:脚本名。迁移脚本命名应该保持 驼峰命名法

Run 命令

Run 命令默认运行执行所有脚本,可选指定环境

可以使用 --t 来指定执行某个迁移脚本

Rollback 命令

Rollback 命令用来回滚之前的迁移脚本。与 Run 命令相反。 你可以使用 rollback 命令回滚上一个迁移脚本。不带任何参数

使用 --t 回滚指定版本迁移脚本

指定版本如果设置为0则回滚所有脚本

可以使用 --d 参数回滚指定日期的脚本

创建Seed类

不像数据库迁移,Phinx 并不记录 seed 是否执行过。这意味着 seeders 可以被重复执行。请在开发的时候记住

Phinx 用下面命令创建一个新的 seed 类

执行 Seed

这很简单,当注入数据库时,只需要运行 seed:run 命令

默认Phinx会执行所有 seed。 如果你想要指定执行一个,只要增加 --s 参数并接 seed 的名字


All versions of thinkphp-migration with dependencies

PHP Build Version
Package Version
Requires robmorgan/phinx Version ^0.11.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ke/thinkphp-migration contains the following files

Loading the files please wait ....