Download the PHP package ajiho/think-phinx without Composer

On this page you can find all versions of the php package ajiho/think-phinx. 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 think-phinx

think-phinx

基于phinx封装的一个thinkphp6数据库迁移工具

设计灵感来自于wdaglb/thinkphp-migration 并在此基础上进行了大量优化

think-phinx phinx
1.0.0 ~0.13.0

特性

安装

安装过程中会询问你是否确认安装该插件? y

安装完毕后运行php think会得到如下信息

配置文件

安装完毕后会自动生成配置文件/config/phinx.php

命令

phinx官方文档命令用法保持一致 如果您想获取每个命令的具体选项您除了查看phinx官方文档外,您还可以使用以下指令进行查看

例如:

migrate:create

tips:迁移文件名称必须是大驼峰命名规范

php think migrate:create CreateUserTable

migrate:breakpoint

Breakpoint 命令用于设置断点,允许您限制回滚。您可以通过不提供任何参数来切换最近迁移的断点。

php think migrate:breakpoint
php think migrate:breakpoint -e development
php think migrate:breakpoint -e development -t 20230801141644
php think migrate:breakpoint -e development -t 20230801141644 --set
php think migrate:breakpoint -e development -t 20230801141644 --unset
# 删除所有断点
php think migrate:breakpoint -e development -r

migrate:rollback

不指定任何参数只回退最后一个迁移文件,步长为1

php think migrate:rollback

指定执行环境,默认环境根据配置文件可以设置

php think migrate:rollback -e development

要将所有迁移回滚到特定版本,请使用-t参数

php think migrate:rollback -e development -t 20230801141644

回滚所有迁移 -t 0

php think migrate:rollback -e development -t 0

要将所有迁移回滚到特定日期,请使用-d参数

php think migrate:rollback -e development -d 2012
php think migrate:rollback -e development -d 201201
php think migrate:rollback -e development -d 20120103
php think migrate:rollback -e development -d 2012010312
php think migrate:rollback -e development -d 201201031205
php think migrate:rollback -e development -d 20120103120530

设置了断点,阻止了进一步的回滚,您可以使用-f 参数覆盖断点。

php think migrate:rollback -e development -t 0 -f

将查询打印到标准输出而不执行它们,使用 --dry-run 参数

php think migrate:rollback --dry-run
php think migrate:rollback -t 0 --dry-run

migrate:run

默认迁移指定的默认环境和所有的迁移文件

php think migrate:run

指定环境

php think migrate:run -e development
php think migrate:run -e testing
php think migrate:run -e production

指定环境同时指定指定的版本或者日期之前的迁移文件

# 表示只执行到20110103081132迁移文件就结束
php think migrate:run -e development -t 20110103081132
# 表示只执行到2011年1月3号的迁移文件就停止迁移
php think migrate:run -e development -d 20110103

migrate:status

Status 命令打印所有迁移的列表及其当前状态。您可以使用此命令来确定已运行哪些迁移。

php think migrate:status
php think migrate:status -e development

seed:create

PS:建议创建时最好保持一个命名规范填充文件名+Seeder,必须是大驼峰命名规范

php think seed:create UserSeeder

seed:run

php think seed:run
php think seed:run -e development
php think seed:run -e development -s UserSeeder

同时指定多个填充文件,通过 -s 追加

php think seed:run -s UserSeeder -s PermissionSeeder -s LogSeeder

seeder填充文件默认是随机的,有的时候你需要先填充某个表再填充某个表就需要通过getDependencies()方法指定特定的顺序进行填充

文档


All versions of think-phinx with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
cakephp/core Version ~4.3.0
cakephp/utility Version ~4.3.0
cakephp/datasource Version ~4.3.0
cakephp/database Version ~4.3.0
robmorgan/phinx Version ~0.13.0
topthink/framework Version ^6.0
composer-plugin-api Version ^2.3
fakerphp/faker Version ^1.20.0
ext-json Version *
ajiho/namespaceify Version ^1.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 ajiho/think-phinx contains the following files

Loading the files please wait ....