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