Welcome Guest, Not a member yet? Register   Sign In
problem with migrations
#1

(This post was last modified: 05-06-2020, 01:10 AM by midav.)

Hi everyone, there was a problem in the new version, or it was because it works from the console through SPAKE, but I try to start the migration through the controller, I do everything according to the documentation. And it says if you run
PHP Code:
$migrate->latest() 
then it will go through all the namespaces and will look for migrations and run them. But in fact, it doesn’t do this because I called
PHP Code:
$migrate->findMigrations () 
and it empty didn’t get there the way of these migrations. Only this way works
PHP Code:
$migrate->setNamespace('Myth \ Auth')->latest() 

(05-06-2020, 01:01 AM)midav Wrote: Hi everyone, there was a problem in the new version, or it was because it works from the console through SPAKE, but I try to start the migration through the controller, I do everything according to the documentation. And it says if you run
PHP Code:
$migrate->latest() 
then it will go through all the namespaces and will look for migrations and run them. But in fact, it doesn’t do this because I called
PHP Code:
$migrate->findMigrations () 
and it empty didn’t get there the way of these migrations. Only this way works
PHP Code:
$migrate->setNamespace('Myth \ Auth')->latest() 

all because of this check
PHP Code:
$namespaces $this->namespace ? [$this->namespace] : array_keys(Services::autoloader()->getNamespace()); 
because App gets into $this->namespace and everything and then doesn’t give us all namespace because $this->namespace exists
Reply




Theme © iAndrew 2016 - Forum software by © MyBB