array( 'create_table' => array( 'users' => array( 'id' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 36, 'key' => 'primary'), 'username' => array('type' => 'string', 'null' => false, 'default' => null), 'slug' => array('type' => 'string', 'null' => false, 'default' => null), 'password' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 128), 'password_token' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 128), 'email' => array('type' => 'string', 'null' => true, 'default' => null), 'email_verified' => array('type' => 'boolean', 'null' => true, 'default' => '0'), 'email_token' => array('type' => 'string', 'null' => true, 'default' => null), 'email_token_expiry' => array('type' => 'datetime', 'null' => true, 'default' => null), 'tos' => array('type' => 'boolean', 'null' => true, 'default' => '0'), 'active' => array('type' => 'boolean', 'null' => true, 'default' => '0'), 'last_login' => array('type' => 'datetime', 'null' => true, 'default' => null), 'last_action' => array('type' => 'datetime', 'null' => true, 'default' => null), 'is_admin' => array('type' => 'boolean', 'null' => true, 'default' => '0'), 'role' => array('type' => 'string', 'null' => true, 'default' => null), 'created' => array('type' => 'datetime', 'null' => true, 'default' => null), 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null), 'indexes' => array( 'PRIMARY' => array('column' => 'id', 'unique' => 1), 'BY_USERNAME' => array('column' => array('username'), 'unique' => 0), 'BY_EMAIL' => array('column' => array('email'), 'unique' => 0) ), ), ), ), 'down' => array( 'drop_table' => array('users'), ) ); /** * before migration callback * * @param string $direction, up or down direction of migration process */ public function before($direction) { return true; } /** * after migration callback * * @param string $direction, up or down direction of migration process */ public function after($direction) { return true; } }