migration.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. defined('BASEPATH') OR exit('No direct script access allowed');
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Enable/Disable Migrations
  6. |--------------------------------------------------------------------------
  7. |
  8. | Migrations are disabled by default for security reasons.
  9. | You should enable migrations whenever you intend to do a schema migration
  10. | and disable it back when you're done.
  11. |
  12. */
  13. $config['migration_enabled'] = FALSE;
  14. /*
  15. |--------------------------------------------------------------------------
  16. | Migration Type
  17. |--------------------------------------------------------------------------
  18. |
  19. | Migration file names may be based on a sequential identifier or on
  20. | a timestamp. Options are:
  21. |
  22. | 'sequential' = Sequential migration naming (001_add_blog.php)
  23. | 'timestamp' = Timestamp migration naming (20121031104401_add_blog.php)
  24. | Use timestamp format YYYYMMDDHHIISS.
  25. |
  26. | Note: If this configuration value is missing the Migration library
  27. | defaults to 'sequential' for backward compatibility with CI2.
  28. |
  29. */
  30. $config['migration_type'] = 'timestamp';
  31. /*
  32. |--------------------------------------------------------------------------
  33. | Migrations table
  34. |--------------------------------------------------------------------------
  35. |
  36. | This is the name of the table that will store the current migrations state.
  37. | When migrations runs it will store in a database table which migration
  38. | level the system is at. It then compares the migration level in this
  39. | table to the $config['migration_version'] if they are not the same it
  40. | will migrate up. This must be set.
  41. |
  42. */
  43. $config['migration_table'] = 'migrations';
  44. /*
  45. |--------------------------------------------------------------------------
  46. | Auto Migrate To Latest
  47. |--------------------------------------------------------------------------
  48. |
  49. | If this is set to TRUE when you load the migrations class and have
  50. | $config['migration_enabled'] set to TRUE the system will auto migrate
  51. | to your latest migration (whatever $config['migration_version'] is
  52. | set to). This way you do not have to call migrations anywhere else
  53. | in your code to have the latest migration.
  54. |
  55. */
  56. $config['migration_auto_latest'] = FALSE;
  57. /*
  58. |--------------------------------------------------------------------------
  59. | Migrations version
  60. |--------------------------------------------------------------------------
  61. |
  62. | This is used to set migration version that the file system should be on.
  63. | If you run $this->migration->current() this is the version that schema will
  64. | be upgraded / downgraded to.
  65. |
  66. */
  67. $config['migration_version'] = 0;
  68. /*
  69. |--------------------------------------------------------------------------
  70. | Migrations Path
  71. |--------------------------------------------------------------------------
  72. |
  73. | Path to your migrations folder.
  74. | Typically, it will be within your application path.
  75. | Also, writing permission is required within the migrations path.
  76. |
  77. */
  78. $config['migration_path'] = APPPATH.'migrations/';