PHPackages                             yousign/safe-migrations - 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. yousign/safe-migrations

ActiveLibrary[Database &amp; ORM](/categories/database)

yousign/safe-migrations
=======================

Make your migrations safe

v1.0.6(2y ago)1928.0k↓42.2%MITPHPPHP ^8.1

Since Nov 22Pushed 2y ago9 watchersCompare

[ Source](https://github.com/Yousign/safe-migrations)[ Packagist](https://packagist.org/packages/yousign/safe-migrations)[ RSS](/packages/yousign-safe-migrations/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (8)Versions (8)Used By (0)

🦺 safe-migrations
=================

[](#-safe-migrations)

Make your migrations safe

🪄 Features
----------

[](#-features)

- PG 13+
- PHP 8.1
- Doctrine Migration

🤷 Why?
------

[](#-why)

Because SQL migrations can execute heavy queries on database which can slow down your application.

⚙️ Config
---------

[](#️-config)

*\*For a Symfony &gt; 6.x*

Install in your project

```
$ composer req yousign/safe-migrations
```

Declare the Middleware in your `services.yaml`

```
parameters:
  env(ENABLE_RETRY_LOCK_TIMEOUT): false

services:
  Yousign\SafeMigrations\Doctrine\DBAL\Driver\Middleware\RetryLockTimeoutMiddleware:
    $isEnabled: '%env(bool:ENABLE_RETRY_LOCK_TIMEOUT)%'
```

Create a migration template `migration.php.tpl`

```
