robmorgan/phinx — pull request #33 by valorin (2012-12-08 00:21:46+00:00)
Title: Allowing auto_increment for custom id column

I wanted a way to use a custom column with the `AUTO_INCREMENT` option. Since it was only set for the default `id` field and not for a `primary_key` field, I decided to add support for setting a custom `id` column name via the table options.

Usage:

```php
$user = $this->table('user', array('id' => 'user_id'));
$user->addColumn('username', 'string')
->addColumn('email', 'string')
->addColumn('display_name', 'string')
->addColumn('password', 'string')
->addIndex(array('username', 'email'), array('unique' => true))
->save();
```

I attempted to add a unit test and documentation for it too. Hopefully they fit with how you do things :)