• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problem with migrations

#1
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.