Download the PHP package meritum/migrations without Composer

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

meritum/migrations

Schema migration runner with a CLI interface for the Meritum ecosystem.

Requirements

Installation

Configuration

All configuration is provided via environment variables. Source them before invoking strata or set them in your deployment environment.

Variable Default Description
DB_DRIVER pgsql Database driver — pgsql, mysql, or sqlite
DB_HOST localhost Database host
DB_PORT 5432 Database port
DB_DATABASE (empty) Database name
DB_USERNAME (empty) Database username
DB_PASSWORD (empty) Database password
DB_PGSQL_SCHEMA public PostgreSQL schema
DB_PGSQL_SSL_MODE prefer PostgreSQL SSL mode
DB_MYSQL_CHARSET utf8mb4 MySQL charset
DB_MIGRATIONS_TABLE migrations Table used to track ran migrations
DB_MIGRATIONS_PATH ./migrations Directory where migration files are stored
APP_ENV production Application environment — affects production guards
APP_DEBUG false Enable debug mode

The DB_MIGRATIONS_PATH defaults to a migrations/ directory in whichever directory strata is invoked from. Running strata from the project root gives ./migrations without any additional configuration.

Commands

migration:install

Creates the migrations tracking table in the database. Run this once before using any other commands.

Use --force or -f to run in production environments:

Running migration:run calls migration:install automatically, so explicit installation is optional.


migration:make

Generates a new migration file in the configured migrations directory. The filename is prefixed with a timestamp automatically.

To generate a create table migration with a pre-filled stub:

To generate an alter table migration:

Omitting --create-table and --alter-table generates a blank migration. --create-table and --alter-table are mutually exclusive.


migration:run

Runs all pending migrations in chronological order. Migrations that have already run are skipped. All pending migrations are grouped into a single batch.

Use --force or -f to run in production:


migration:rollback

Rolls back all migrations in the last batch by calling their down() methods in reverse order.

Use --force or -f to run in production:


migration:status

Displays a table of all known migrations with their batch number and timestamp. Pending migrations appear with empty batch and timestamp columns.

Writing migrations

Migration files must return an anonymous class implementing MigrationInterface. The up() method applies the change; down() reverses it.

SchemaInterface exposes create(), alter(), drop(), dropIfExists(), and tableExists(). The Blueprint API is provided by georgeff/schema.

Kernel integration

MigrationsModule and DatabaseModule register all services with the kernel. Use KernelBuilder as the entry point:

To extend the kernel with additional modules or service definitions, pass a ServiceRegistrar:

KernelBuilder::build() accepts environment, registrar, and debug as named arguments.

License

MIT — see LICENSE.


All versions of migrations with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
aura/sql Version ^6.0
georgeff/database Version ^1.0
georgeff/kernel Version ^1.6
georgeff/schema Version ^1.1
meritum/cli 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 meritum/migrations contains the following files

Loading the files please wait ...