Skip to content

Commit

Permalink
unsigned pk docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DimazzzZ committed Feb 18, 2016
1 parent 4abe806 commit 418a6b6
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docs/migrations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,37 @@ To simply change the name of the primary key, we need to override the default ``
}
}
By default ``primary_key`` is ``signed``.
To simply set it to unsigned just pass ``signed`` option with ``false`` value:

.. code-block:: php
<?php
use Phinx\Migration\AbstractMigration;
class MyNewMigration extends AbstractMigration
{
/**
* Migrate Up.
*/
public function up()
{
$table = $this->table('followers', array('signed' => false));
$table->addColumn('follower_id', 'integer')
->addColumn('created', 'timestamp', array('default' => 'CURRENT_TIMESTAMP'))
->save();
}
/**
* Migrate Down.
*/
public function down()
{
}
}
Valid Column Types
~~~~~~~~~~~~~~~~~~

Expand Down

0 comments on commit 418a6b6

Please sign in to comment.