Git Product home page Git Product logo

migrator's People

Contributors

cenoura avatar emtudo avatar fraterblack avatar hernandev avatar vinicius73 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

migrator's Issues

FatalThrowableError

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 ';'

Laravel 7.x support?

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.

Call to a member function all() on null

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.

Integração com Lumen

A necessidade

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.

Ambiente

Q A
Framework Lumen
Versão 5.8.4
Versão do Migrator 2.0.0
Versão do PHP 7.2.15

Preparando o Lumen para rodar os comandos 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.

Os problemas

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. :)

migrator:fresh doesn't work with postgres

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.

Rollback não executa na ordem de registro

Bom dia galera. Estou com o seguinte cenário.

  1. Registro os migrator em uma ordem específica de criação.
  2. Crio meu migrator com o total de 21 tabelas.
  3. Ao realizar o rollback, o plugin tenta realizar a operação fora da ordem que está na tabela "migration"
    Isso ocasiona um erro, pois ele tenta deletar uma tabela que possui dependências.

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.