Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: start migration in manual mode #2942

Closed
lebidvadim opened this issue May 6, 2020 · 4 comments
Closed

Bug: start migration in manual mode #2942

lebidvadim opened this issue May 6, 2020 · 4 comments
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@lebidvadim
Copy link

Direction
migrations

Describe the bug
when migrations are manually started via the $migrate->latest() function; it creates only the migrations table and does not find all namespaces.

CodeIgniter 4 version
4.0.3.

Affected module(s)
system\ Database\MigrationRunner.php line 475

Expected behavior, and steps to reproduce if appropriate
it’s not clear why you did that check because APP gets into $this->namespace and in Services:: autoloader ()->getNamespace() it is already there, and that check turns out like I don’t need.

Context

  • OS: [e.g. Windows 11]
  • Web server [e.g. Apache 1.2.3]
  • PHP version [e.g. 7.2]
@lebidvadim lebidvadim added the bug Verified issues on the current code behavior or pull requests that will fix them label May 6, 2020
@lebidvadim lebidvadim changed the title Bug: Bug: start migration in manual mode May 6, 2020
@nyufeng
Copy link
Contributor

nyufeng commented May 6, 2020

if you want run all namespace, you can use
$migration->setNamespace(null)->latest()

@lebidvadim
Copy link
Author

so why should I do this if the documentation says use $migrate->latest ()

@MGatner
Copy link
Member

MGatner commented May 6, 2020

You can also use $migration->setNamespace(null)->latest() to include migrations from all namespaces.

It is literally the next line.

@samsonasik
Copy link
Member

can be closed in favor of #2943

@MGatner MGatner closed this as completed May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

No branches or pull requests

4 participants