PHPackages                             carva/id-to-uuid - 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. carva/id-to-uuid

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

carva/id-to-uuid
================

Easily migrate from auto incremented id to uuid

16PHP

Since Mar 10Pushed 3y agoCompare

[ Source](https://github.com/carvaofficial/id-to-uuid)[ Packagist](https://packagist.org/packages/carva/id-to-uuid)[ RSS](/packages/carva-id-to-uuid/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

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

[](#id-to-uuid)

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 habbim/id-to-uuid

```

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
