Migrations.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. * files have already been run.
  25. */
  26. public string $table = 'migrations';
  27. /**
  28. * --------------------------------------------------------------------------
  29. * Timestamp Format
  30. * --------------------------------------------------------------------------
  31. *
  32. * This is the format that will be used when creating new migrations
  33. * using the CLI command:
  34. * > php spark make:migration
  35. *
  36. * NOTE: if you set an unsupported format, migration runner will not find
  37. * your migration files.
  38. *
  39. * Supported formats:
  40. * - YmdHis_
  41. * - Y-m-d-His_
  42. * - Y_m_d_His_
  43. */
  44. public string $timestampFormat = 'Y-m-d-His_';
  45. /**
  46. * --------------------------------------------------------------------------
  47. * Enable/Disable Migration Lock
  48. * --------------------------------------------------------------------------
  49. *
  50. * Locking is disabled by default.
  51. *
  52. * When enabled, it will prevent multiple migration processes
  53. * from running at the same time by using a lock mechanism.
  54. *
  55. * This is useful in production environments to avoid conflicts
  56. * or race conditions during concurrent deployments.
  57. */
  58. public bool $lock = false;
  59. }