Download the PHP package thathoff/kirby-migrations without Composer

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

Kirby Migrations

This plugin provides commands to Kirby CLI for simple migrations.

Use cases are database migrations for your SQL database, migrating content or creating pages when deploying your Kirby page. See the examples section for more details.

You can also create migrations for your own plugins. See the Migrations for Plugins section for more details.

Kirby CLI

This plugin uses the Kirby CLI to run migrations. Either use it via composer (this plugin will install it for you) or install it globally.

If you installed it globally, you can run the migrations via kirby migrations:apply otherwise use ./vendor/bin/kirby migrations:apply. In the following, we will assume you’re using it via composer.

Configuration

This plugin provides the following configuration options:

Usage

Create a New Migration

This will create a new migration file in the migrations directory.

Apply All Pending Migrations

This will apply all pending migrations. When using the -f or --force flag, it will apply the migrations without asking for confirmation (eg. for CI/CD pipelines).

Show Status

This will show the status of the migrations.

Rollback the Last Batch of Migrations

This will rollback the last batch of migrations. When using the -f or --force flag, it will rollback the migrations without asking for confirmation.

Migrations for Plugins

Plugins can also have their own migrations. To support migrations in your plugin, you need to create a migrations folder in your plugin's root directory and enable migrations in your plugin's index.php file by setting the migrations option to true.

To use a different path, you can set the migrations option to the path to the migrations directory:

After this, you can create migrations for your plugin by using the migrations:create command and specifying the plugin ID (in the example above it’s example/test) as the second argument.

It’s recommended to prefix your migration names with your plugins name to avoid conflicts with other plugins as all migrations are created in the same namespace.

All other commands will automatically detect the plugin migrations and apply them accordingly.

Examples

All database examples assume you have a database configured in your config.php file.

Create a Table in a Database

Add a New Column to a Table

Create a Page in the Content

This is pretty handy when you need to create pages that should not be created manually (eg. container pages) and only should exist once.

Authors

Maintained and developed by Markus Denhoff and Contributors.

Supported by reinorange GmbH.


All versions of kirby-migrations with dependencies

PHP Build Version
Package Version
Requires getkirby/composer-installer Version ^1.1
getkirby/cms Version ^4.7.0|^5.0.0
getkirby/cli Version ^1.6
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 thathoff/kirby-migrations contains the following files

Loading the files please wait ...