1 <?php
2
3 namespace Icybee\Modules\Users;
4
5 /**
6 * - Alter the column `password_hash` to suit the requirements of the Password API.
7 * - Rename the column `created` as `created_at`.
8 *
9 * @module users
10 */
11 class Update20131021 extends \ICanBoogie\Updater\Update
12 {
13 public function update_column_password_hash()
14 {
15 $this->module->model
16 ->assert_has_column('password_hash')
17 ->assert_not_column_has_size('password_hash', 255)
18 ->alter_column('password_hash');
19 }
20
21 public function update_column_created()
22 {
23 $this->module->model
24 ->assert_has_column('created')
25 ->rename_column('created', 'created_at');
26 }
27 }