MigrationRepositoryInterface.php 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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 list of migrations.
  13. *
  14. * @param int $steps
  15. * @return array
  16. */
  17. public function getMigrations($steps);
  18. /**
  19. * Get the last migration batch.
  20. *
  21. * @return array
  22. */
  23. public function getLast();
  24. /**
  25. * Get the completed migrations with their batch numbers.
  26. *
  27. * @return array
  28. */
  29. public function getMigrationBatches();
  30. /**
  31. * Log that a migration was run.
  32. *
  33. * @param string $file
  34. * @param int $batch
  35. * @return void
  36. */
  37. public function log($file, $batch);
  38. /**
  39. * Remove a migration from the log.
  40. *
  41. * @param object $migration
  42. * @return void
  43. */
  44. public function delete($migration);
  45. /**
  46. * Get the next migration batch number.
  47. *
  48. * @return int
  49. */
  50. public function getNextBatchNumber();
  51. /**
  52. * Create the migration repository data store.
  53. *
  54. * @return void
  55. */
  56. public function createRepository();
  57. /**
  58. * Determine if the migration repository exists.
  59. *
  60. * @return bool
  61. */
  62. public function repositoryExists();
  63. /**
  64. * Set the information source to gather data.
  65. *
  66. * @param string $name
  67. * @return void
  68. */
  69. public function setSource($name);
  70. }