File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ $app = new \Gt\Cli\Application(
2424 new RunCommand (),
2525 new BuildCommand (),
2626 new CronCommand (),
27- new ServeCommand ()
27+ new ServeCommand (),
28+ new MigrateCommand ()
2829);
2930$ app ->run ();
Original file line number Diff line number Diff line change 1+ <?php
2+ namespace Gt \Installer \Command ;
3+
4+ use Gt \Cli \Argument \ArgumentValueList ;
5+ use Gt \Cli \Parameter \NamedParameter ;
6+ use Gt \Cli \Parameter \Parameter ;
7+
8+ class MigrateCommand extends AbstractWebEngineCommand {
9+ public function run (ArgumentValueList $ arguments = null ):void {
10+ $ this ->executeScript (
11+ $ arguments ,
12+ "db-migrate "
13+ );
14+ }
15+
16+ public function getName ():string {
17+ return "migrate " ;
18+ }
19+
20+ public function getDescription ():string {
21+ return "Run the database migrations " ;
22+ }
23+
24+ /** @return NamedParameter[] */
25+ public function getRequiredNamedParameterList ():array {
26+ return [];
27+ }
28+
29+ /** @return NamedParameter[] */
30+ public function getOptionalNamedParameterList ():array {
31+ return [];
32+ }
33+
34+ /** @return Parameter[] */
35+ public function getRequiredParameterList ():array {
36+ return [];
37+ }
38+
39+ /** @return Parameter[] */
40+ public function getOptionalParameterList ():array {
41+ return [
42+ new Parameter (
43+ false ,
44+ "force " ,
45+ "f "
46+ ),
47+ ];
48+ }
49+ }
You can’t perform that action at this time.
0 commit comments