Skip to content

Commit c9521d0

Browse files
authored
Merge pull request #76 from RonasIT/add-force-flag-to-migrate
chore: add --force flag to migrate
2 parents 72d0675 + 5f47119 commit c9521d0

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/Commands/InitCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ protected function runMigrations(): void
422422
],
423423
]);
424424

425-
shell_exec('php artisan migrate --ansi');
425+
shell_exec('php artisan migrate --ansi --force');
426426
}
427427

428428
protected function createAdminUser(string $kebabName, string $serviceKey = '', string $serviceName = ''): array

tests/InitCommandTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function testRunWithoutAdminAndReadmeCreationConvertAppNameToPascalCaseTe
4343
$this->callShellExec('./vendor/bin/cghooks update --ansi'),
4444
$this->callShellExec('php artisan lang:publish --ansi'),
4545
$this->callShellExec('php artisan vendor:publish --tag=initializator-web-login --force'),
46-
$this->callShellExec('php artisan migrate --ansi'),
46+
$this->callShellExec('php artisan migrate --ansi --force'),
4747
);
4848

4949
$this
@@ -96,7 +96,7 @@ public function testRunWithoutAdminAndReadmeCreation()
9696
$this->callShellExec('composer require ronasit/laravel-telescope-extension --ansi'),
9797
$this->callShellExec('php artisan telescope:install --ansi'),
9898
$this->callShellExec('php artisan vendor:publish --tag=initializator-web-login --force'),
99-
$this->callShellExec('php artisan migrate --ansi'),
99+
$this->callShellExec('php artisan migrate --ansi --force'),
100100
);
101101

102102
$this
@@ -149,7 +149,7 @@ public function testRunWithAdminAndWithoutReadmeCreation()
149149
$this->callShellExec('composer require ronasit/laravel-telescope-extension --ansi'),
150150
$this->callShellExec('php artisan telescope:install --ansi'),
151151
$this->callShellExec('php artisan vendor:publish --tag=initializator-web-login --force'),
152-
$this->callShellExec('php artisan migrate --ansi'),
152+
$this->callShellExec('php artisan migrate --ansi --force'),
153153
);
154154

155155
$this
@@ -217,7 +217,7 @@ public function testRunWithAdminAndDefaultReadmeCreation()
217217
$this->callShellExec('composer require ronasit/laravel-telescope-extension --ansi'),
218218
$this->callShellExec('php artisan telescope:install --ansi'),
219219
$this->callShellExec('php artisan vendor:publish --tag=initializator-web-login --force'),
220-
$this->callShellExec('php artisan migrate --ansi'),
220+
$this->callShellExec('php artisan migrate --ansi --force'),
221221
);
222222

223223
$this->mockNativeFunction(
@@ -340,7 +340,7 @@ public function testRunWithAdminAndPartialReadmeCreation()
340340
$this->callShellExec('composer require ronasit/laravel-telescope-extension --ansi'),
341341
$this->callShellExec('php artisan telescope:install --ansi'),
342342
$this->callShellExec('php artisan vendor:publish --tag=initializator-web-login --force'),
343-
$this->callShellExec('php artisan migrate --ansi'),
343+
$this->callShellExec('php artisan migrate --ansi --force'),
344344
);
345345

346346
$this->mockNativeFunction(
@@ -453,7 +453,7 @@ public function testRunWithAdminAndFullReadmeCreationAndRemovingInitializatorIns
453453
$this->callShellExec('composer require ronasit/laravel-media --ansi'),
454454
$this->callShellExec('php artisan vendor:publish --tag=initializator-web-login --force'),
455455
$this->callShellExec('composer remove --dev ronasit/laravel-project-initializator --ansi'),
456-
$this->callShellExec('php artisan migrate --ansi'),
456+
$this->callShellExec('php artisan migrate --ansi --force'),
457457
);
458458

459459
$this->mockNativeFunction(
@@ -574,7 +574,7 @@ public function testRunWithoutAdminAndUsingTelescope()
574574
$this->callShellExec('composer require ronasit/laravel-telescope-extension --ansi'),
575575
$this->callShellExec('php artisan telescope:install --ansi'),
576576
$this->callShellExec('php artisan vendor:publish --tag=initializator-web-login --force'),
577-
$this->callShellExec('php artisan migrate --ansi'),
577+
$this->callShellExec('php artisan migrate --ansi --force'),
578578
);
579579

580580
$this->mockNativeFunction(
@@ -699,7 +699,7 @@ public function testRunWithClerkMobileAppWithPintInstalled(): void
699699
$this->callShellExec('composer require ronasit/laravel-telescope-extension --ansi'),
700700
$this->callShellExec('php artisan telescope:install --ansi'),
701701
$this->callShellExec('php artisan vendor:publish --tag=initializator-web-login --force'),
702-
$this->callShellExec('php artisan migrate --ansi'),
702+
$this->callShellExec('php artisan migrate --ansi --force'),
703703
);
704704

705705
$this->mockNativeFunction(
@@ -831,7 +831,7 @@ public function testRunWithClerkAdditionalAdminsWithoutDefaultAdmin(): void
831831
$this->callShellExec('composer require ronasit/laravel-telescope-extension --ansi'),
832832
$this->callShellExec('php artisan telescope:install --ansi'),
833833
$this->callShellExec('php artisan vendor:publish --tag=initializator-web-login --force'),
834-
$this->callShellExec('php artisan migrate --ansi'),
834+
$this->callShellExec('php artisan migrate --ansi --force'),
835835
);
836836

837837
$this->mockNativeFunction(

0 commit comments

Comments
 (0)