View file app/database/migrations/20161231195554_create_surprise_table.php

File size: 479B
<?php

use Phinx\Migration\AbstractMigration;

class CreateSurpriseTable extends AbstractMigration
{
    /**
     * Change Method.
     */
    public function change()
    {
        $table = $this->table('surprise', ['collation' => 'utf8mb4_unicode_ci']);
        $table->addColumn('user', 'string', ['limit' => 20])
            ->addColumn('year', 'year', ['limit' => 4])
            ->addColumn('time', 'integer')
            ->addIndex('user')
            ->create();
    }
}