MigrationRepositoryInterface.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. namespace Illuminate\Database\Migrations;
  3. interface MigrationRepositoryInterface
  4. {
  5. /**
  6. * Get the ran migrations for a given package.
  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. * Log that a migration was run.
  26. *
  27. * @param string $file
  28. * @param int $batch
  29. * @return void
  30. */
  31. public function log($file, $batch);
  32. /**
  33. * Remove a migration from the log.
  34. *
  35. * @param object $migration
  36. * @return void
  37. */
  38. public function delete($migration);
  39. /**
  40. * Get the next migration batch number.
  41. *
  42. * @return int
  43. */
  44. public function getNextBatchNumber();
  45. /**
  46. * Create the migration repository data store.
  47. *
  48. * @return void
  49. */
  50. public function createRepository();
  51. /**
  52. * Determine if the migration repository exists.
  53. *
  54. * @return bool
  55. */
  56. public function repositoryExists();
  57. /**
  58. * Set the information source to gather data.
  59. *
  60. * @param string $name
  61. * @return void
  62. */
  63. public function setSource($name);
  64. }