PHPackages                             alexandrump/id-to-uuid-doctrine3 - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. alexandrump/id-to-uuid-doctrine3

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

alexandrump/id-to-uuid-doctrine3
================================

Easily migrate from auto incremented id to uuid

1.0.0(3y ago)01381MITPHPPHP &gt;=8.0

Since Sep 15Pushed 3y agoCompare

[ Source](https://github.com/Alexandrump/id-to-uuid-doctrine3)[ Packagist](https://packagist.org/packages/alexandrump/id-to-uuid-doctrine3)[ RSS](/packages/alexandrump-id-to-uuid-doctrine3/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (5)Versions (2)Used By (0)

id-to-uuid-doctrine3
====================

[](#id-to-uuid-doctrine3)

This library is a port of `habbim/id-to-uuid` package for Doctrine 3.

Easily migrate from an auto incremented integer id to a [uuid](https://en.wikipedia.org/wiki/Universally_unique_identifier) in a project using [DoctrineMigrationsBundle](https://github.com/doctrine/DoctrineMigrationsBundle). Autodetect your foreign keys and update them. **Works only on MySQL**.

Installation
------------

[](#installation)

```
composer require alexandrump/id-to-uuid-doctrine3

```

Usage
-----

[](#usage)

1. Update your `id` column from `integer` to `guid`:

```
# User.orm.xml

---
---
+++
+++
+++

 #...

```

2. Config your symfony:

[Click here](https://github.com/ramsey/uuid-doctrine#innodb-optimised-binary-uuids)

3. Add a new migration:

```
// app/DoctrineMigrations/VersionXYZ.php
