Migrations.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace Config;
  3. use CodeIgniter\Config\BaseConfig;
  4. class Migrations extends BaseConfig
  5. {
  6. /**
  7. * --------------------------------------------------------------------------
  8. * Enable/Disable Migrations
  9. * --------------------------------------------------------------------------
  10. *
  11. * Migrations are enabled by default.
  12. *
  13. * You should enable migrations whenever you intend to do a schema migration
  14. * and disable it back when you're done.
  15. */
  16. public bool $enabled = true;
  17. /**
  18. * --------------------------------------------------------------------------
  19. * Migrations Table
  20. * --------------------------------------------------------------------------
  21. *
  22. * This is the name of the table that will store the current migrations state.
  23. * When migrations runs it will store in a database table which migration
  24. * level the system is at. It then compares the migration level in this
  25. * table to the $config['migration_version'] if they are not the same it
  26. * will migrate up. This must be set.
  27. */
  28. public string $table = 'migrations';
  29. /**
  30. * --------------------------------------------------------------------------
  31. * Timestamp Format
  32. * --------------------------------------------------------------------------
  33. *
  34. * This is the format that will be used when creating new migrations
  35. * using the CLI command:
  36. * > php spark make:migration
  37. *
  38. * NOTE: if you set an unsupported format, migration runner will not find
  39. * your migration files.
  40. *
  41. * Supported formats:
  42. * - YmdHis_
  43. * - Y-m-d-His_
  44. * - Y_m_d_His_
  45. */
  46. public string $timestampFormat = 'Y-m-d-His_';
  47. }