Skip to content

Controller Migrations

Jeff Johns edited this page Feb 4, 2014 · 5 revisions
Controller Extends Path
Migrations Plain_Controller /application/controllers/tools.php

Request Types

Type Accessible
XMLHttpRequest No
API No
Web View No

This controller allows to run migrations both up and down from CLI without admin permissions.

Methods

__construct - Public

Called automatically which in turn calls the parent constructor. It also does the following:

  • Checks if request is command-line, redirect out if not

latest - Public

Update DB to most current version configured in migration.php config file.

Example

$ php index.php migrations latest

version - Public

Update DB to specified version

Passed Parameters
Param Type Default Required Description
version numeric null Yes Migrations version to update to.

Example

$ php index.php migrations version 9