2 use Migrations\AbstractMigration;
4 class CreateUsers extends AbstractMigration
9 * More information on this method is available here:
10 * http://docs.phinx.org/en/latest/migrations.html#the-change-method
13 public function change()
15 $this->table('users', ['id' => false, 'primary_key' => ['id']])
16 ->addColumn('id', 'integer', ['identity' => true, 'signed' => false])
17 ->addColumn('name', 'string', ['length' => 128, 'null' => false])
18 ->addColumn('token', 'string', ['length' => 2048, 'null' => true])
19 ->addColumn('created', 'datetime')
20 ->addColumn('modified', 'datetime')