1 | <?php |
||
16 | class ChangeCommand extends Command |
||
17 | { |
||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $done = 'Migrated: '; |
||
22 | |||
23 | /** |
||
24 | * @var \Rougin\Refinery\Manager |
||
25 | */ |
||
26 | protected $manager; |
||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $pending = 'Migrating: '; |
||
32 | |||
33 | /** |
||
34 | * @var boolean |
||
35 | */ |
||
36 | protected $reversed = false; |
||
37 | |||
38 | /** |
||
39 | * Initializes the command instance. |
||
40 | * |
||
41 | * @param \Rougin\Refinery\Manager $manager |
||
42 | */ |
||
43 | 6 | public function __construct(Manager $manager) |
|
49 | |||
50 | /** |
||
51 | * Returns the current version of migration. |
||
52 | * |
||
53 | * @param array $migrations |
||
54 | * @return integer |
||
55 | */ |
||
56 | protected function current($migrations) |
||
66 | |||
67 | /** |
||
68 | * Executes the command. |
||
69 | * |
||
70 | * @param \Symfony\Component\Console\Input\InputInterface $input |
||
71 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
||
72 | * @return void |
||
73 | */ |
||
74 | protected function execute(InputInterface $input, OutputInterface $output) |
||
94 | |||
95 | /** |
||
96 | * Migrates the database to a specified schema version. |
||
97 | * |
||
98 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
||
99 | * @param string $filename |
||
100 | * @param string $version |
||
101 | * @return boolean |
||
102 | */ |
||
103 | protected function migrate(OutputInterface $output, $filename, $version) |
||
113 | |||
114 | /** |
||
115 | * Returns an array of database migrations. |
||
116 | * |
||
117 | * @return array |
||
118 | */ |
||
119 | protected function migrations() |
||
135 | |||
136 | /** |
||
137 | * Outputs a text based on filename from a database migration. |
||
138 | * |
||
139 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
||
140 | * @param string $filename |
||
141 | * @param boolean $pending |
||
142 | * @return void |
||
143 | */ |
||
144 | protected function text(OutputInterface $output, $filename, $pending = false) |
||
160 | } |
||
161 |