# DdmsProjectMigration

## How to generate new migration script

1. Navigate to the Shopware Root Directory: Open your terminal and navigate to the root directory of your Shopware installation.
2. Create a Migration: Use the Shopware console command to create a migration. The command syntax is as follows:
   - `/usr/bin/php bin/console database:create-migration -p DdmsProjectMigrations --name DescriptiveMigrationName`
     - `-p DdmsProjectMigrations`: Specifies the plugin for which the migration is being created.
     - `--name DescriptiveMigrationName`: Provides a descriptive name for the migration, which will be appended after a timestamp in the migration file name

## How to run the migrations

1. Navigate to the Shopware Root Directory: Open your terminal and navigate to the root directory of your Shopware installation.
2. Run following command to run all migrations from all plugin and from shopware itself:
   - `/usr/bin/php bin/console database:migrate --all` 
   or run following command to run only the migrations from this plugin:
   - `/usr/bin/php bin/console database:migrate DdmsProjectMigrations --all` 