PHPackages                             viosys/vio-db-migration - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. viosys/vio-db-migration

ActiveShopware-plugin[Database &amp; ORM](/categories/database)

viosys/vio-db-migration
=======================

Shopware plugin to apply project-specific DB-Updates

v2.3.4(5y ago)11MITPHPPHP ^5.6.4||^7.0

Since Aug 15Pushed 5y ago1 watchersCompare

[ Source](https://github.com/viosys/VioDbMigration)[ Packagist](https://packagist.org/packages/viosys/vio-db-migration)[ RSS](/packages/viosys-vio-db-migration/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (16)Used By (0)

VioDbMigration
==============

[](#viodbmigration)

Shopware plugin to apply project-specific DB-Updates

Setup
-----

[](#setup)

### Git Version

[](#git-version)

- Checkout Plugin in `/custom/plugins/VioDbMigration`
- Change to Directory and run `composer install` to install the dependencies
- Install the Plugin with the Plugin Manager

### Install with composer

[](#install-with-composer)

- Change to your root Installation of shopware
- Run command `composer require viosys/vio-db-migration` and install and active plugin with Plugin Manager

### Install and active the plugin

[](#install-and-active-the-plugin)

- to install the plugin via build process, we have added an [installation script](deploy.php)
- which you could run in your ant-build or the composer post-update script

1. Composer
    - modify your repository version of `app/post-update.sh`
    - add the following line before the migration console command

    ```
    /usr/bin/env php $(dirname "$0")/../custom/project/VioDbMigration/deploy.php --dbhost ${DB_HOST} --dbname ${DB_DATABASE} --dbuser ${DB_USERNAME} --dbpassword ${DB_PASSWORD} --migrationpath ${VIO_MIGRATIONPATH} --migrationnamespace ${VIO_MIGRATIONNAMESPACE}
    ```
2. Ant
    - when you want to run and add VioDbMigration in your ant-build definition send a message

Usage
-----

[](#usage)

1. create empty directory `vio_sql/migrations`
2. create Migration-Class with a consecutive number in the class name and in the file name `100-migration.php`

```
