-
Notifications
You must be signed in to change notification settings - Fork 41
/
MigrationRepositoryInterface.php
executable file
·81 lines (71 loc) · 1.53 KB
/
MigrationRepositoryInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
/*
* Copyright (c) Taylor Otwell, Leroy Merlin Brasil
* Copyrights licensed under the MIT License.
* See the accompanying LICENSE file for terms.
*/
namespace MongolidLaravel\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.
*
* @param string $name
*/
public function setSource($name);
}