Rolling back/stepping forward with version()
You may wish to deliberately alter the database by pointing it to a specific migration number. This can be achieved by use of the
version() function within CodeIgniter.
Ensure that you have followed the preceding recipe, Using CodeIgniter database migrations.
How to do it...
- Using your command line (terminal application), navigate to the root of your CodeIgniter installation (where the index.php file is) and type the following:
php index.php migrate version 1
How it works...
Consider the following command line:
php index.php migrate version number
number is highlighted as it specifies the migration file number to move to, that is,
3, and so on.
The first thing we should bear in mind is ...