|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace Doctrine\Migrations; |
|
6
|
|
|
|
|
7
|
|
|
use Doctrine\DBAL\Schema\Schema; |
|
8
|
|
|
|
|
9
|
|
|
/** |
|
10
|
|
|
* The MigratorConfiguration class is responsible for defining the configuration for a migration. |
|
11
|
|
|
* |
|
12
|
|
|
* @internal |
|
13
|
|
|
* |
|
14
|
|
|
* @see Doctrine\Migrations\Migrator |
|
15
|
|
|
* @see Doctrine\Migrations\Version\Executor |
|
16
|
|
|
*/ |
|
17
|
|
|
class MigratorConfiguration |
|
18
|
|
|
{ |
|
19
|
|
|
/** @var bool */ |
|
20
|
|
|
private $dryRun = false; |
|
21
|
|
|
|
|
22
|
|
|
/** @var bool */ |
|
23
|
|
|
private $timeAllQueries = false; |
|
24
|
|
|
|
|
25
|
|
|
/** @var bool */ |
|
26
|
|
|
private $noMigrationException = false; |
|
27
|
|
|
|
|
28
|
|
|
/** @var bool */ |
|
29
|
|
|
private $allOrNothing = false; |
|
30
|
|
|
|
|
31
|
|
|
/** @var Schema|null */ |
|
32
|
|
|
private $fromSchema; |
|
33
|
|
|
|
|
34
|
61 |
|
public function isDryRun() : bool |
|
35
|
|
|
{ |
|
36
|
61 |
|
return $this->dryRun; |
|
37
|
|
|
} |
|
38
|
|
|
|
|
39
|
29 |
|
public function setDryRun(bool $dryRun) : self |
|
40
|
|
|
{ |
|
41
|
29 |
|
$this->dryRun = $dryRun; |
|
42
|
|
|
|
|
43
|
29 |
|
return $this; |
|
44
|
|
|
} |
|
45
|
|
|
|
|
46
|
24 |
|
public function getTimeAllQueries() : bool |
|
47
|
|
|
{ |
|
48
|
24 |
|
return $this->timeAllQueries; |
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
7 |
|
public function setTimeAllQueries(bool $timeAllQueries) : self |
|
52
|
|
|
{ |
|
53
|
7 |
|
$this->timeAllQueries = $timeAllQueries; |
|
54
|
|
|
|
|
55
|
7 |
|
return $this; |
|
56
|
|
|
} |
|
57
|
|
|
|
|
58
|
3 |
|
public function getNoMigrationException() : bool |
|
59
|
|
|
{ |
|
60
|
3 |
|
return $this->noMigrationException; |
|
61
|
|
|
} |
|
62
|
|
|
|
|
63
|
5 |
|
public function setNoMigrationException(bool $noMigrationException = false) : self |
|
64
|
|
|
{ |
|
65
|
5 |
|
$this->noMigrationException = $noMigrationException; |
|
66
|
|
|
|
|
67
|
5 |
|
return $this; |
|
68
|
|
|
} |
|
69
|
|
|
|
|
70
|
29 |
|
public function isAllOrNothing() : bool |
|
71
|
|
|
{ |
|
72
|
29 |
|
return $this->allOrNothing; |
|
73
|
|
|
} |
|
74
|
|
|
|
|
75
|
6 |
|
public function setAllOrNothing(bool $allOrNothing) : self |
|
76
|
|
|
{ |
|
77
|
6 |
|
$this->allOrNothing = $allOrNothing; |
|
78
|
|
|
|
|
79
|
6 |
|
return $this; |
|
80
|
|
|
} |
|
81
|
|
|
|
|
82
|
18 |
|
public function getFromSchema() : ?Schema |
|
83
|
|
|
{ |
|
84
|
18 |
|
return $this->fromSchema; |
|
85
|
|
|
} |
|
86
|
|
|
|
|
87
|
26 |
|
public function setFromSchema(Schema $fromSchema) : self |
|
88
|
|
|
{ |
|
89
|
26 |
|
$this->fromSchema = $fromSchema; |
|
90
|
|
|
|
|
91
|
26 |
|
return $this; |
|
92
|
|
|
} |
|
93
|
|
|
} |
|
94
|
|
|
|