MigrationRepositoryInterface.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. namespace Illuminate\Database\Migrations;
  3. interface MigrationRepositoryInterface
  4. {
  5. /**
  6. * Get the completed migrations.
  7. *
  8. * @return array
  9. */
  10. public function getRan();
  11. /**
  12. * Get the list of migrations.
  13. *
  14. * @param int $steps
  15. * @return array
  16. */
  17. public function getMigrations($steps);
  18. /**
  19. * Get the list of the migrations by batch.
  20. *
  21. * @param int $batch
  22. * @return array
  23. */
  24. public function getMigrationsByBatch($batch);
  25. /**
  26. * Get the last migration batch.
  27. *
  28. * @return array
  29. */
  30. public function getLast();
  31. /**
  32. * Get the completed migrations with their batch numbers.
  33. *
  34. * @return array
  35. */
  36. public function getMigrationBatches();
  37. /**
  38. * Log that a migration was run.
  39. *
  40. * @param string $file
  41. * @param int $batch
  42. * @return void
  43. */
  44. public function log($file, $batch);
  45. /**
  46. * Remove a migration from the log.
  47. *
  48. * @param object $migration
  49. * @return void
  50. */
  51. public function delete($migration);
  52. /**
  53. * Get the next migration batch number.
  54. *
  55. * @return int
  56. */
  57. public function getNextBatchNumber();
  58. /**
  59. * Create the migration repository data store.
  60. *
  61. * @return void
  62. */
  63. public function createRepository();
  64. /**
  65. * Determine if the migration repository exists.
  66. *
  67. * @return bool
  68. */
  69. public function repositoryExists();
  70. /**
  71. * Delete the migration repository data store.
  72. *
  73. * @return void
  74. */
  75. public function deleteRepository();
  76. /**
  77. * Set the information source to gather data.
  78. *
  79. * @param string $name
  80. * @return void
  81. */
  82. public function setSource($name);
  83. }