| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <?php
- declare(strict_types=1);
- /**
- * This file is part of Hyperf.
- *
- * @link https://www.hyperf.io
- * @document https://hyperf.wiki
- * @contact group@hyperf.io
- * @license https://github.com/hyperf/hyperf/blob/master/LICENSE
- */
- namespace Hyperf\Database\Migrations;
- interface MigrationRepositoryInterface
- {
- /**
- * Get the completed migrations.
- *
- * @return array
- */
- public function getRan();
- /**
- * Get list of migrations.
- *
- * @param int $steps
- * @return array
- */
- public function getMigrations($steps);
- /**
- * Get the last migration batch.
- *
- * @return array
- */
- public function getLast();
- /**
- * Get the completed migrations with their batch numbers.
- *
- * @return array
- */
- public function getMigrationBatches();
- /**
- * Log that a migration was run.
- *
- * @param string $file
- * @param int $batch
- */
- public function log($file, $batch);
- /**
- * Remove a migration from the log.
- *
- * @param object $migration
- */
- public function delete($migration);
- /**
- * Get the next migration batch number.
- *
- * @return int
- */
- public function getNextBatchNumber();
- /**
- * Create the migration repository data store.
- */
- public function createRepository();
- /**
- * Determine if the migration repository exists.
- *
- * @return bool
- */
- public function repositoryExists();
- /**
- * Set the information source to gather data.
- */
- public function setSource(?string $name);
- }
|