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\DbalMigrator |
15
|
|
|
* @see Doctrine\Migrations\Version\DbalExecutor |
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
|
51 |
|
public function isDryRun() : bool |
35
|
|
|
{ |
36
|
51 |
|
return $this->dryRun; |
37
|
|
|
} |
38
|
|
|
|
39
|
38 |
|
public function setDryRun(bool $dryRun) : self |
40
|
|
|
{ |
41
|
38 |
|
$this->dryRun = $dryRun; |
42
|
|
|
|
43
|
38 |
|
return $this; |
44
|
|
|
} |
45
|
|
|
|
46
|
10 |
|
public function getTimeAllQueries() : bool |
47
|
|
|
{ |
48
|
10 |
|
return $this->timeAllQueries; |
49
|
|
|
} |
50
|
|
|
|
51
|
44 |
|
public function setTimeAllQueries(bool $timeAllQueries) : self |
52
|
|
|
{ |
53
|
44 |
|
$this->timeAllQueries = $timeAllQueries; |
54
|
|
|
|
55
|
44 |
|
return $this; |
56
|
|
|
} |
57
|
|
|
|
58
|
1 |
|
public function getNoMigrationException() : bool |
59
|
|
|
{ |
60
|
1 |
|
return $this->noMigrationException; |
61
|
|
|
} |
62
|
|
|
|
63
|
1 |
|
public function setNoMigrationException(bool $noMigrationException = false) : self |
64
|
|
|
{ |
65
|
1 |
|
$this->noMigrationException = $noMigrationException; |
66
|
|
|
|
67
|
1 |
|
return $this; |
68
|
|
|
} |
69
|
|
|
|
70
|
6 |
|
public function isAllOrNothing() : bool |
71
|
|
|
{ |
72
|
6 |
|
return $this->allOrNothing; |
73
|
|
|
} |
74
|
|
|
|
75
|
36 |
|
public function setAllOrNothing(bool $allOrNothing) : self |
76
|
|
|
{ |
77
|
36 |
|
$this->allOrNothing = $allOrNothing; |
78
|
|
|
|
79
|
36 |
|
return $this; |
80
|
|
|
} |
81
|
|
|
|
82
|
1 |
|
public function getFromSchema() : ?Schema |
83
|
|
|
{ |
84
|
1 |
|
return $this->fromSchema; |
85
|
|
|
} |
86
|
|
|
|
87
|
3 |
|
public function setFromSchema(Schema $fromSchema) : self |
88
|
|
|
{ |
89
|
3 |
|
$this->fromSchema = $fromSchema; |
90
|
|
|
|
91
|
3 |
|
return $this; |
92
|
|
|
} |
93
|
|
|
} |
94
|
|
|
|