Merge branch 'master' of feistymeow.org:feisty_meow
[feisty_meow.git] / production / example_apps / shared_calendar / config / Migrations / 20170725211622_CreateUsers.php
1 <?php
2 use Migrations\AbstractMigration;
3
4 class CreateUsers extends AbstractMigration
5 {
6     /**
7      * Change Method.
8      *
9      * More information on this method is available here:
10      * http://docs.phinx.org/en/latest/migrations.html#the-change-method
11      * @return void
12      */
13     public function change()
14     {
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')
21             ->addIndex('name')
22             ->create();
23     }
24 }