Andrey Andreev | e734b38 | 2012-03-26 13:42:36 +0300 | [diff] [blame] | 1 | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 2 | /** |
| 3 | * CodeIgniter |
| 4 | * |
Phil Sturgeon | 07c1ac8 | 2012-03-09 17:03:37 +0000 | [diff] [blame] | 5 | * An open source application development framework for PHP 5.2.4 or newer |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 6 | * |
| 7 | * NOTICE OF LICENSE |
Eric Barnes | dd81c43 | 2011-11-16 11:07:35 -0500 | [diff] [blame] | 8 | * |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 9 | * Licensed under the Academic Free License version 3.0 |
Eric Barnes | dd81c43 | 2011-11-16 11:07:35 -0500 | [diff] [blame] | 10 | * |
Derek Jones | 61df906 | 2011-10-21 09:55:40 -0500 | [diff] [blame] | 11 | * This source file is subject to the Academic Free License (AFL 3.0) that is |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 12 | * bundled with this package in the files license_afl.txt / license_afl.rst. |
| 13 | * It is also available through the world wide web at this URL: |
| 14 | * http://opensource.org/licenses/AFL-3.0 |
| 15 | * If you did not receive a copy of the license and are unable to obtain it |
| 16 | * through the world wide web, please send an email to |
| 17 | * licensing@ellislab.com so we can send you a copy immediately. |
| 18 | * |
| 19 | * @package CodeIgniter |
| 20 | * @author EllisLab Dev Team |
Greg Aker | 0defe5d | 2012-01-01 18:46:41 -0600 | [diff] [blame] | 21 | * @copyright Copyright (c) 2008 - 2012, EllisLab, Inc. (http://ellislab.com/) |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 22 | * @license http://opensource.org/licenses/AFL-3.0 Academic Free License (AFL 3.0) |
| 23 | * @link http://codeigniter.com |
| 24 | * @since Version 1.0 |
| 25 | * @filesource |
| 26 | */ |
| 27 | |
Kyle Farris | ad17f4b | 2011-10-14 15:43:25 -0400 | [diff] [blame] | 28 | /* |
| 29 | |-------------------------------------------------------------------------- |
| 30 | | Enable/Disable Migrations |
| 31 | |-------------------------------------------------------------------------- |
| 32 | | |
| 33 | | Migrations are disabled by default for security reasons. |
| 34 | | You should enable migrations whenever you intend to do a schema migration |
| 35 | | and disable it back when you're done. |
| 36 | | |
| 37 | */ |
| 38 | $config['migration_enabled'] = FALSE; |
| 39 | |
| 40 | /* |
| 41 | |-------------------------------------------------------------------------- |
Jonathon Hill | b719bfd | 2012-11-12 09:03:36 -0500 | [diff] [blame^] | 42 | | Migration Type |
Jonathon Hill | 34c8b9c | 2012-10-31 14:02:35 -0400 | [diff] [blame] | 43 | |-------------------------------------------------------------------------- |
| 44 | | |
| 45 | | Migration file names may be based on a sequential identifier or on |
| 46 | | a timestamp. Options are: |
| 47 | | |
| 48 | | 'sequential' = Default migration naming (001_add_blog.php) |
| 49 | | 'timestamp' = Timestamp migration naming (20121031104401_add_blog.php) |
| 50 | | Use timestamp format YYYYMMDDHHIISS. |
| 51 | | |
| 52 | | If this configuration value is missing the Migration library defaults |
| 53 | | to 'sequential' for backward compatibility. |
| 54 | | |
| 55 | */ |
Jonathon Hill | b719bfd | 2012-11-12 09:03:36 -0500 | [diff] [blame^] | 56 | $config['migration_type'] = 'timestamp'; |
Jonathon Hill | 34c8b9c | 2012-10-31 14:02:35 -0400 | [diff] [blame] | 57 | |
| 58 | /* |
| 59 | |-------------------------------------------------------------------------- |
Kyle Farris | ad17f4b | 2011-10-14 15:43:25 -0400 | [diff] [blame] | 60 | | Migrations table |
| 61 | |-------------------------------------------------------------------------- |
| 62 | | |
| 63 | | This is the name of the table that will store the current migrations state. |
Eric Barnes | dd81c43 | 2011-11-16 11:07:35 -0500 | [diff] [blame] | 64 | | When migrations runs it will store in a database table which migration |
Robert Doucette | a465fc4 | 2012-06-19 01:49:01 +0300 | [diff] [blame] | 65 | | level the system is at. It then compares the migration level in this |
Kyle Farris | ad17f4b | 2011-10-14 15:43:25 -0400 | [diff] [blame] | 66 | | table to the $config['migration_version'] if they are not the same it |
| 67 | | will migrate up. This must be set. |
| 68 | | |
| 69 | */ |
| 70 | $config['migration_table'] = 'migrations'; |
| 71 | |
Kyle Farris | ad17f4b | 2011-10-14 15:43:25 -0400 | [diff] [blame] | 72 | /* |
| 73 | |-------------------------------------------------------------------------- |
| 74 | | Auto Migrate To Latest |
| 75 | |-------------------------------------------------------------------------- |
| 76 | | |
Eric Barnes | dd81c43 | 2011-11-16 11:07:35 -0500 | [diff] [blame] | 77 | | If this is set to TRUE when you load the migrations class and have |
Kyle Farris | ad17f4b | 2011-10-14 15:43:25 -0400 | [diff] [blame] | 78 | | $config['migration_enabled'] set to TRUE the system will auto migrate |
| 79 | | to your latest migration (whatever $config['migration_version'] is |
| 80 | | set to). This way you do not have to call migrations anywhere else |
| 81 | | in your code to have the latest migration. |
| 82 | | |
| 83 | */ |
| 84 | $config['migration_auto_latest'] = FALSE; |
| 85 | |
Kyle Farris | ad17f4b | 2011-10-14 15:43:25 -0400 | [diff] [blame] | 86 | /* |
| 87 | |-------------------------------------------------------------------------- |
| 88 | | Migrations version |
| 89 | |-------------------------------------------------------------------------- |
| 90 | | |
| 91 | | This is used to set migration version that the file system should be on. |
Eric Barnes | dd81c43 | 2011-11-16 11:07:35 -0500 | [diff] [blame] | 92 | | If you run $this->migration->current() this is the version that schema will |
Kyle Farris | ad17f4b | 2011-10-14 15:43:25 -0400 | [diff] [blame] | 93 | | be upgraded / downgraded to. |
| 94 | | |
| 95 | */ |
| 96 | $config['migration_version'] = 0; |
| 97 | |
Kyle Farris | ad17f4b | 2011-10-14 15:43:25 -0400 | [diff] [blame] | 98 | /* |
| 99 | |-------------------------------------------------------------------------- |
| 100 | | Migrations Path |
| 101 | |-------------------------------------------------------------------------- |
| 102 | | |
| 103 | | Path to your migrations folder. |
| 104 | | Typically, it will be within your application path. |
| 105 | | Also, writing permission is required within the migrations path. |
| 106 | | |
| 107 | */ |
| 108 | $config['migration_path'] = APPPATH . 'migrations/'; |
| 109 | |
Andrey Andreev | e734b38 | 2012-03-26 13:42:36 +0300 | [diff] [blame] | 110 | /* End of file migration.php */ |
| 111 | /* Location: ./application/config/migration.php */ |