artesaos / migrator Goto Github PK
View Code? Open in Web Editor NEWNamespaced Migrations for Laravel 5.1+
License: Other
Namespaced Migrations for Laravel 5.1+
License: Other
PHP version: PHP 7.0.8-0ubuntu0.16.04.3
Laravel Framework version: 5.3.6
Migrator version: ^1.1
When i try to run
php artisan migrator:reset
The output is
[Symfony\Component\Debug\Exception\FatalThrowableError]
Parse error: syntax error, unexpected 'abstract' (T_ABSTRACT), expecting ',' or ';'
Hello maintainers.
Do you plan to update this package to support Laravel 7? or this package has been abandoned?
As we can see the last update was in 2018.
Thanks.
Caras, estou rodando laravel 5.1.45.
Quando entro com o comando php artisan migrator, retorna o seguinte erro:
[Symfony\Component\Debug\Exception\FatalThrowableError]
Call to a member function all() on null
Tentei reinstalar o package limpando cache. Refiz todo o readme, mas sem sucesso. O erro continua.
Estou acompanhando a série laravel-hardcore do Codecasts no YouTube, gostei muito do padrão feito pelo @hernandev nas vídeo aulas e agora estou tentando replicar esse design de pastas no Lumen.
Eu não estou conseguindo resolver alguns problemas e gostaria de contar com vocês se possível, já testei o pacote no Laravel 5.8 e está funcionando perfeitamente.
Segue abaixo meu ambiente e as explicações dos procedimentos que já executei e dos erros que obtive.
Q | A |
---|---|
Framework | Lumen |
Versão | 5.8.4 |
Versão do Migrator | 2.0.0 |
Versão do PHP | 7.2.15 |
migrator
Para rodar o comando php artisan migrator
foi necessário registrar o pacote em bootstrap/app.php, conforme trecho abaixo:
/*
* Third Parts Providers...
*/
$app->register(Migrator\MigrationServiceProvider::class);
Como o pacote utiliza a função config_path() das helpers do Laravel, foi necessário replicar a mesma em um arquivo helpers.php, segui o procedimento desse link, já que essa função não existe no Lumen.
Ao rodar o comando php artisan migrator
obtive o seguinte erro:
In Container.php line 794:
Class migrator.instance does not exist
Acredito que seja por conta da classe MigratorTrait
, já que o mesmo possui esse trecho de código como podem observar no código abaixo:
MigratorTrait.php (link do arquivo original)
<?php
namespace Migrator;
trait MigratorTrait
{
public function migrations($migrations, $alias = null)
{
if (is_array($migrations)) {
foreach ($migrations as $migration) {
$this->app['migrator.instance']->registerMigration($migration);
}
} else {
$this->app['migrator.instance']->registerMigration($migrations, $alias);
}
}
public function seeders($seeders)
{
if (is_array($seeders)) {
foreach ($seeders as $seeder) {
$this->app['migrator.seeder.manager']->addSeeder($seeder);
}
} else {
$this->app['migrator.seeder.manager']->addSeeder($seeders);
}
}
}
Desde já agradeço, espero que consigam me ajudar. :)
The SHOW TABLES command inside the getAllTables function in the FreshCommand file doesn't work with postgres because the SHOW TABLES command doesn't exists on the postgres dialect.
Bom dia galera. Estou com o seguinte cenário.
Todavia, se eu executar o comando "php artisan migrator --step" e realizar o rollback (um a um), funciona normalmente. Eu acredito que não deveria funcionar dessa forma. Se eu estiver esquecendo de algo, podem me dar um auxílio? Valeu!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.