Download the PHP package fyre/migration without Composer
On this page you can find all versions of the php package fyre/migration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package migration
FyreMigration
FyreMigration is a free, open-source migration library for PHP.
Table Of Contents
- Installation
- Migration Runners
- Migrations
- Migration History Registry
- Migration Histories
Installation
Using Composer
In PHP:
Migration Runners
Clear
Clear loaded migrations.
Get Connection
Get the Connection.
Get Forge
Get the Forge.
Get History
Get the MigrationHistory.
Get Migration
Get a Migration.
$version
is a number representing the migration version.
Get Migrations
Get all migrations.
Get Namespace
Get the namespace.
Has Migration
Check if a migration version exists.
$version
is a number representing the migration version.
Migrate
Migrate to a version.
$version
is a number representing the migration version, and will default to null.
Rollback
Rollback to a version.
$version
is a number representing the migration version, and will default to null.
Set Connection
Set the Connection.
$connection
is the Connection.
Set Namespace
Set the namespace.
$namespace
is a string representing the migration namespace.
Migrations
Migrations can be created by extending \Fyre\Migration\Migration
, ensuring all below methods are implemented.
Your migrations must be placed in the same namespace as defined by the setNamespace
method above.
Migration classes should follow the naming convention of Migration_{version}
where {version}
is the version number.
Down
Perform a "down" migration.
Up
Perform an "up" migration.
Migration History Registry
Get History
Get the Connection.
$connection
is a Connection.
Set Handler
Set a Connection class.
$connectionClass
is a string representing the Connection class name.$historyClass
is a string representing the MigrationHistory class name.
Migration Histories
Add
Add a Migration to the history.
$migration
is a Migration.
All
Get the migration history.
Current
Get the current version.
All versions of migration with dependencies
fyre/forge Version ^4.0
fyre/loader Version ^2.0
fyre/command Version ^4.0