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 | * |
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 |
darwinel | 871754a | 2014-02-11 17:34:57 +0100 | [diff] [blame] | 21 | * @copyright Copyright (c) 2008 - 2014, 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 | */ |
darwinel | d8bef8a | 2014-02-11 20:13:22 +0100 | [diff] [blame] | 27 | defined('BASEPATH') OR exit('No direct script access allowed'); |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 28 | |
Kyle Farris | ad17f4b | 2011-10-14 15:43:25 -0400 | [diff] [blame] | 29 | /* |
| 30 | |-------------------------------------------------------------------------- |
| 31 | | Enable/Disable Migrations |
| 32 | |-------------------------------------------------------------------------- |
| 33 | | |
| 34 | | Migrations are disabled by default for security reasons. |
| 35 | | You should enable migrations whenever you intend to do a schema migration |
| 36 | | and disable it back when you're done. |
| 37 | | |
| 38 | */ |
| 39 | $config['migration_enabled'] = FALSE; |
| 40 | |
| 41 | /* |
| 42 | |-------------------------------------------------------------------------- |
Jonathon Hill | b719bfd | 2012-11-12 09:03:36 -0500 | [diff] [blame] | 43 | | Migration Type |
Jonathon Hill | 34c8b9c | 2012-10-31 14:02:35 -0400 | [diff] [blame] | 44 | |-------------------------------------------------------------------------- |
| 45 | | |
| 46 | | Migration file names may be based on a sequential identifier or on |
| 47 | | a timestamp. Options are: |
| 48 | | |
| 49 | | 'sequential' = Default migration naming (001_add_blog.php) |
| 50 | | 'timestamp' = Timestamp migration naming (20121031104401_add_blog.php) |
| 51 | | Use timestamp format YYYYMMDDHHIISS. |
| 52 | | |
| 53 | | If this configuration value is missing the Migration library defaults |
| 54 | | to 'sequential' for backward compatibility. |
| 55 | | |
| 56 | */ |
Jonathon Hill | b719bfd | 2012-11-12 09:03:36 -0500 | [diff] [blame] | 57 | $config['migration_type'] = 'timestamp'; |
Jonathon Hill | 34c8b9c | 2012-10-31 14:02:35 -0400 | [diff] [blame] | 58 | |
| 59 | /* |
| 60 | |-------------------------------------------------------------------------- |
Kyle Farris | ad17f4b | 2011-10-14 15:43:25 -0400 | [diff] [blame] | 61 | | Migrations table |
| 62 | |-------------------------------------------------------------------------- |
| 63 | | |
| 64 | | 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] | 65 | | When migrations runs it will store in a database table which migration |
Robert Doucette | a465fc4 | 2012-06-19 01:49:01 +0300 | [diff] [blame] | 66 | | 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] | 67 | | table to the $config['migration_version'] if they are not the same it |
| 68 | | will migrate up. This must be set. |
| 69 | | |
| 70 | */ |
| 71 | $config['migration_table'] = 'migrations'; |
| 72 | |
Kyle Farris | ad17f4b | 2011-10-14 15:43:25 -0400 | [diff] [blame] | 73 | /* |
| 74 | |-------------------------------------------------------------------------- |
| 75 | | Auto Migrate To Latest |
| 76 | |-------------------------------------------------------------------------- |
| 77 | | |
Eric Barnes | dd81c43 | 2011-11-16 11:07:35 -0500 | [diff] [blame] | 78 | | 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] | 79 | | $config['migration_enabled'] set to TRUE the system will auto migrate |
| 80 | | to your latest migration (whatever $config['migration_version'] is |
| 81 | | set to). This way you do not have to call migrations anywhere else |
| 82 | | in your code to have the latest migration. |
| 83 | | |
| 84 | */ |
| 85 | $config['migration_auto_latest'] = FALSE; |
| 86 | |
Kyle Farris | ad17f4b | 2011-10-14 15:43:25 -0400 | [diff] [blame] | 87 | /* |
| 88 | |-------------------------------------------------------------------------- |
| 89 | | Migrations version |
| 90 | |-------------------------------------------------------------------------- |
| 91 | | |
| 92 | | 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] | 93 | | 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] | 94 | | be upgraded / downgraded to. |
| 95 | | |
| 96 | */ |
| 97 | $config['migration_version'] = 0; |
| 98 | |
Kyle Farris | ad17f4b | 2011-10-14 15:43:25 -0400 | [diff] [blame] | 99 | /* |
| 100 | |-------------------------------------------------------------------------- |
| 101 | | Migrations Path |
| 102 | |-------------------------------------------------------------------------- |
| 103 | | |
| 104 | | Path to your migrations folder. |
| 105 | | Typically, it will be within your application path. |
| 106 | | Also, writing permission is required within the migrations path. |
| 107 | | |
| 108 | */ |
Andrey Andreev | c8c260f | 2013-11-27 13:58:52 +0200 | [diff] [blame] | 109 | $config['migration_path'] = APPPATH.'migrations/'; |
Kyle Farris | ad17f4b | 2011-10-14 15:43:25 -0400 | [diff] [blame] | 110 | |
Andrey Andreev | e734b38 | 2012-03-26 13:42:36 +0300 | [diff] [blame] | 111 | /* End of file migration.php */ |
| 112 | /* Location: ./application/config/migration.php */ |