darwinel | d8bef8a | 2014-02-11 20:13:22 +0100 | [diff] [blame] | 1 | <?php |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 2 | /** |
| 3 | * CodeIgniter |
| 4 | * |
Andrey Andreev | fe9309d | 2015-01-09 17:48:58 +0200 | [diff] [blame] | 5 | * An open source application development framework for PHP |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 6 | * |
Andrey Andreev | bdb96ca | 2014-10-28 00:13:31 +0200 | [diff] [blame] | 7 | * This content is released under the MIT License (MIT) |
Eric Barnes | dd81c43 | 2011-11-16 11:07:35 -0500 | [diff] [blame] | 8 | * |
Andrey Andreev | fe9309d | 2015-01-09 17:48:58 +0200 | [diff] [blame] | 9 | * Copyright (c) 2014 - 2015, British Columbia Institute of Technology |
Eric Barnes | dd81c43 | 2011-11-16 11:07:35 -0500 | [diff] [blame] | 10 | * |
Andrey Andreev | bdb96ca | 2014-10-28 00:13:31 +0200 | [diff] [blame] | 11 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 12 | * of this software and associated documentation files (the "Software"), to deal |
| 13 | * in the Software without restriction, including without limitation the rights |
| 14 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 15 | * copies of the Software, and to permit persons to whom the Software is |
| 16 | * furnished to do so, subject to the following conditions: |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 17 | * |
Andrey Andreev | bdb96ca | 2014-10-28 00:13:31 +0200 | [diff] [blame] | 18 | * The above copyright notice and this permission notice shall be included in |
| 19 | * all copies or substantial portions of the Software. |
| 20 | * |
| 21 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 22 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 23 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 24 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 25 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 26 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 27 | * THE SOFTWARE. |
| 28 | * |
| 29 | * @package CodeIgniter |
| 30 | * @author EllisLab Dev Team |
darwinel | 871754a | 2014-02-11 17:34:57 +0100 | [diff] [blame] | 31 | * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) |
Andrey Andreev | fe9309d | 2015-01-09 17:48:58 +0200 | [diff] [blame] | 32 | * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) |
Andrey Andreev | bdb96ca | 2014-10-28 00:13:31 +0200 | [diff] [blame] | 33 | * @license http://opensource.org/licenses/MIT MIT License |
| 34 | * @link http://codeigniter.com |
| 35 | * @since Version 1.0.0 |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 36 | * @filesource |
| 37 | */ |
darwinel | d8bef8a | 2014-02-11 20:13:22 +0100 | [diff] [blame] | 38 | defined('BASEPATH') OR exit('No direct script access allowed'); |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 39 | |
Kyle Farris | ad17f4b | 2011-10-14 15:43:25 -0400 | [diff] [blame] | 40 | /* |
| 41 | |-------------------------------------------------------------------------- |
| 42 | | Enable/Disable Migrations |
| 43 | |-------------------------------------------------------------------------- |
| 44 | | |
| 45 | | Migrations are disabled by default for security reasons. |
| 46 | | You should enable migrations whenever you intend to do a schema migration |
| 47 | | and disable it back when you're done. |
| 48 | | |
| 49 | */ |
| 50 | $config['migration_enabled'] = FALSE; |
| 51 | |
| 52 | /* |
| 53 | |-------------------------------------------------------------------------- |
Jonathon Hill | b719bfd | 2012-11-12 09:03:36 -0500 | [diff] [blame] | 54 | | Migration Type |
Jonathon Hill | 34c8b9c | 2012-10-31 14:02:35 -0400 | [diff] [blame] | 55 | |-------------------------------------------------------------------------- |
| 56 | | |
| 57 | | Migration file names may be based on a sequential identifier or on |
| 58 | | a timestamp. Options are: |
| 59 | | |
| 60 | | 'sequential' = Default migration naming (001_add_blog.php) |
| 61 | | 'timestamp' = Timestamp migration naming (20121031104401_add_blog.php) |
| 62 | | Use timestamp format YYYYMMDDHHIISS. |
| 63 | | |
| 64 | | If this configuration value is missing the Migration library defaults |
| 65 | | to 'sequential' for backward compatibility. |
| 66 | | |
| 67 | */ |
Jonathon Hill | b719bfd | 2012-11-12 09:03:36 -0500 | [diff] [blame] | 68 | $config['migration_type'] = 'timestamp'; |
Jonathon Hill | 34c8b9c | 2012-10-31 14:02:35 -0400 | [diff] [blame] | 69 | |
| 70 | /* |
| 71 | |-------------------------------------------------------------------------- |
Kyle Farris | ad17f4b | 2011-10-14 15:43:25 -0400 | [diff] [blame] | 72 | | Migrations table |
| 73 | |-------------------------------------------------------------------------- |
| 74 | | |
| 75 | | 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] | 76 | | When migrations runs it will store in a database table which migration |
Robert Doucette | a465fc4 | 2012-06-19 01:49:01 +0300 | [diff] [blame] | 77 | | 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] | 78 | | table to the $config['migration_version'] if they are not the same it |
| 79 | | will migrate up. This must be set. |
| 80 | | |
| 81 | */ |
| 82 | $config['migration_table'] = 'migrations'; |
| 83 | |
Kyle Farris | ad17f4b | 2011-10-14 15:43:25 -0400 | [diff] [blame] | 84 | /* |
| 85 | |-------------------------------------------------------------------------- |
| 86 | | Auto Migrate To Latest |
| 87 | |-------------------------------------------------------------------------- |
| 88 | | |
Eric Barnes | dd81c43 | 2011-11-16 11:07:35 -0500 | [diff] [blame] | 89 | | 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] | 90 | | $config['migration_enabled'] set to TRUE the system will auto migrate |
| 91 | | to your latest migration (whatever $config['migration_version'] is |
| 92 | | set to). This way you do not have to call migrations anywhere else |
| 93 | | in your code to have the latest migration. |
| 94 | | |
| 95 | */ |
| 96 | $config['migration_auto_latest'] = FALSE; |
| 97 | |
Kyle Farris | ad17f4b | 2011-10-14 15:43:25 -0400 | [diff] [blame] | 98 | /* |
| 99 | |-------------------------------------------------------------------------- |
| 100 | | Migrations version |
| 101 | |-------------------------------------------------------------------------- |
| 102 | | |
| 103 | | 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] | 104 | | 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] | 105 | | be upgraded / downgraded to. |
| 106 | | |
| 107 | */ |
| 108 | $config['migration_version'] = 0; |
| 109 | |
Kyle Farris | ad17f4b | 2011-10-14 15:43:25 -0400 | [diff] [blame] | 110 | /* |
| 111 | |-------------------------------------------------------------------------- |
| 112 | | Migrations Path |
| 113 | |-------------------------------------------------------------------------- |
| 114 | | |
| 115 | | Path to your migrations folder. |
| 116 | | Typically, it will be within your application path. |
| 117 | | Also, writing permission is required within the migrations path. |
| 118 | | |
| 119 | */ |
Andrey Andreev | c8c260f | 2013-11-27 13:58:52 +0200 | [diff] [blame] | 120 | $config['migration_path'] = APPPATH.'migrations/'; |
Kyle Farris | ad17f4b | 2011-10-14 15:43:25 -0400 | [diff] [blame] | 121 | |
Andrey Andreev | e734b38 | 2012-03-26 13:42:36 +0300 | [diff] [blame] | 122 | /* End of file migration.php */ |
| 123 | /* Location: ./application/config/migration.php */ |