Download the PHP package arfaram/ezdatabasemigrationschema without Composer

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

EzPlatformDatabaseSchemaMigrationBundle

This bundle comes with several commands to export, import and drop database table(s) using schema files during or after site development. It allows you also to add data to your tables

Basically, you can use DoctrineMigrationsBundle or KaliopMigrationBundle to achieve database migration but this bundle uses the doctrine-dbal-schema bundle(used only during eZ Platform installation) and coming with ezplatform v2.5. It uses the same concept and classes to migrate custom schema either using mysql or postgresql databases.

Requirement

eZPlatform 2.5+ (Open Source or EE), PHP 7+

Installation

Commands

Export Schema

Parameters:

Note: You can specify the export folder path in parameters.yml otherwise it will create the dump files in your installation root folder:

Example:

Note: Using eZPlatform Cloud you should mount the export path folder in .platform.app.yaml:

Import Schema

This command imports custom schema definition and you have to add the schema file path in parameters.yml

Example:

You can find a schema example in bundle/doc/schema.yml or the legacy ezplatform schema.yaml

Import Data

Sometimes you want also to import data to an existing database table. This is also possible using below command:

You have to add your sql file path in parameters.yml

Example:

You can find an sql file example in bundle/doc/mysql/data.sql or just check more ezplatform mysql or postgresql clean data installation example.

Drop table(s) using schema file

This command removes table(s) using an existing schema file.You have to add the file path in parameters.yml

Example:

Drop table(s) using table name

This command is using doctrine schema manager to drop db table.

How it works:

SchemaBuilder

The Installer.php class extends the CoreInstaller (used only during eZ Platform installation) but its constructor becomes a custom SchemaBuilder. It has the same structure like the EzSystems\DoctrineSchema\Builder\SchemaBuilder introduced in the doctrine-dbal-schema bundle.

The EventsSubscriber BuildSchemaSubscriber class will load the schema using the importSchemaFromFile() method defined in the SchemaBuilder.

You can also add a custom Subscriber which contains your custom schema. See the example in services.yml.

Take into account to use the SchemaBuilderEvents::INSTALLER_BUILD_SCHEMA event name to dispatch your subscriber during execution.

ImportData

The DbDataInstaller extend the DbBasedInstaller coming with the PlatformInstallerBundle and being used by CoreInstaller.php (used only during eZ Platform installation)

This class hat its own constructor and importData() method which runs your custom queries.


All versions of ezdatabasemigrationschema with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
ezsystems/ezpublish-kernel Version ^7.5
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 arfaram/ezdatabasemigrationschema contains the following files

Loading the files please wait ....