@jasen
To create a new migration in Symfony, you can follow these steps:
- Make sure you have the DoctrineMigrationsBundle installed in your Symfony project. You can do this by running the following command:composer require doctrine/doctrine-migrations-bundle
- Once you have the bundle installed, you can create a new migration by running the following command:bin/console doctrine:migrations:diff
This command will generate a new migration file in the src/Migrations directory of your project. The filename will be in the format Version{timestamp}.php, where {timestamp} is the current timestamp.
- Open the new migration file and add the necessary changes to the database schema. You can use Doctrine's schema builder to create tables, add columns, indexes, foreign keys, etc.
- After you have made your changes, you need to apply the migration to the database by running the following command:bin/console doctrine:migrations:migrate
This command will execute all the pending migrations in the correct order.
That's it! Your new migration should now be applied to the database schema.