2017 © Pedro Peláez
 

library sw-migrations

Uses the shopware interface to enable custom database migrations.

image

b3nl/sw-migrations

Uses the shopware interface to enable custom database migrations.

  • Tuesday, April 19, 2016
  • by WBLKonzept
  • Repository
  • 1 Watchers
  • 2 Stars
  • 3,629 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 14 % Grown

The README.md

sw-migrations

This package was inspired by the original database deployment of shopware. $SHOPWARE_ROOT./build/ApplyDeltas.php iterates through $SHOPWARE_ROOT/_sql/migrations and executes every migration file in this directory. Every migration file contains a class of type Shopware\Components\Migrations\AbstractMigration., (*1)

ApplyDeltas.php is a shell script which can be called like:, (*2)

php ./ApplyDeltas.php --username="root" --password="example" --host="localhost" --dbname="example-db" [ --mode=(install|update) ]

Shopware saves (in table s_schema_version) which migration files were executes and executes only new ones in following calls., (*3)

The general process stays the same with this package, but we add extended functionality with a custom, (*4)

vendor/b3nl/sw-migrations/build/ApplyDeltas.php

This shell scripts provides additional parameters for iterating through custom migrations. It adds implements additional parameters to do so:, (*5)

  • shoppath: Your shopware root directory, because we could install this package in any directory we want
  • migrationpath: The path to your custom migration folder
  • tablesuffix: This suffix is used to create a custom version table for your specified migration path. If you do not provide this value, your custom migration history is merged to the standard history. We suggest, that you provide this value in any case!

This script could even be used to call the shopware standard migrations like so:, (*6)

php vendor/b3nl/sw-migrations/build/ApplyDeltas.php --username="root" --password="example" --host="localhost" --dbname="example-db" [ --shoppath=$SHOPWARE_ROOT --migrationpath=$SHOPWARE_ROOT/_sql/migrations --mode=(install|update) ]

German blog post about it: http://ecommerce-developer.de/shopware-migrationen-fuer-eigene-deployments-nutzen/, (*7)

The Versions

19/04 2016

dev-master

9999999-dev

Uses the shopware interface to enable custom database migrations.

  Sources   Download

MIT

The Requires

  • php >= 5.4.0

 

The Development Requires

22/04 2015

1.0.0

1.0.0.0

Uses the shopware interface to enable custom database migrations.

  Sources   Download

MIT

The Requires

  • php >= 5.4.0

 

The Development Requires