Download the PHP package jmsfwk/fluent-phinx without Composer

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

Fluent Phinx

Laravel-style migrations for Phinx.

Introduction

Phinx provides a way to declare schemas in migrations, but it's somewhat difficult to use because of the array of options that vary by column type.

Fluent Phinx provides a fluent Laravel-style schema builder to simplify writing and reading migrations.

Migration Structure

Fluent Phinx relies on regular Phinx migration files, with either a change method or up/down method pair.

The Fluent trait can be used to add fluent functionality to the migration file.

Tables

Creating Tables

To create a new database table, use the create method on from the Fluent trait. The create method accepts two arguments: the first is the name of the table, while the second is a closure which receives a Blueprint object that may be used to define the new table:

When creating the table, you may use any of the schema builder's column methods to define the table's columns.

Updating Tables

To update a table the update method from the Fluent trait can be used. Like the create method this will accept two arguments: the name of the table, and a closure that receives a Blueprint object to define the changes.

Table Options

You may use the following properties on the schema builder to define the table's options:

Command Description
$table->engine = 'InnoDB'; Specify the table storage engine (MySQL).
$table->collation = 'utf8mb4_unicode_ci'; Specify a default collation for the table (MySQL).
$table->comment = 'Explain something'; Specify a comment for the table.
$table->id = 'id' The name of the automatically created id field (set to false to disable).
$table->primary_key = 'id' The column to use as the primary key (can be set to an array of columns).
$table->signed = false Whether the primary key is signed (defaults to true).

Indexes

Creating Indexes

Indexes can be added in two places, from the column definition and from the Blueprint object.

From the column you can pass the index name to the index method.

To create an index after defining the column, you should call the unique method on the schema builder blueprint. This method accepts the name of the column that should receive a unique index:

You may pass an array of columns to an index method to create a compound (or composite) index:

When creating an index you may pass a second argument to the method to specify the index name:

Available Index Types

Command Description
$table->primary('id'); Adds a primary key.
$table->primary(['id', 'parent_id']); Adds composite keys.
$table->unique('email'); Adds a unique index.
$table->index('state'); Adds an index.

All versions of fluent-phinx with dependencies

PHP Build Version
Package Version
Requires robmorgan/phinx Version ^0.12
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 jmsfwk/fluent-phinx contains the following files

Loading the files please wait ....