As I understood limit option MysqlAdapter::INT_REGULAR
is something like predefined types in Phinx. But you can also use your own limit
variable.
Here is an example:
// using Phinx 0.5.4
public function change() {
$table = $this->table('papers');
$table->addColumn('user_id', 'integer', ['limit' => 2])
->addColumn('book_id', 'integer') // by default will be int(11)
->addColumn('bank_id', 'integer', ['limit' => 32])
->create();
}
MySQL describe results:
+---------+---------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------+---------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| user_id | int(2) | NO | | NULL | |
| book_id | int(11) | NO | | NULL | |
| bank_id | int(32) | NO | | NULL | |
+---------+---------+------+-----+---------+----------------+
To get more information please check the source code of getSqlType()
and source code of getPhinxType()
functions.