Giter Site home page Giter Site logo

Comments (11)

bizley avatar bizley commented on May 14, 2024 1

Please try the new version of this extension and let me know if everything is OK.

Unfortunately all the "create" namespaced migrations in your db must be removed and regenerated (or renamed to fit Yii 2 schema 'm' . gmdate('ymd_His') . '_the_rest_of_the_name', inside class and migration db table).

from yii2-migration.

vuongminh-xx avatar vuongminh-xx commented on May 14, 2024

More information: currently when add version in migration table it use short name of class (not full namespace)

from yii2-migration.

bizley avatar bizley commented on May 14, 2024

I think this is expected behavior now but maybe some workaround can be done.

Could you set migrationNamespaces (--migrationNamespaces, -N) with namespaced version of folder name with the classic migrations? Depending on where you keep them it's i.e. console\migrations or similar.

from yii2-migration.

vuongminh-xx avatar vuongminh-xx commented on May 14, 2024

I had add migrationNamespaces in config file

My app config:

    'migrate' => [
            'class' => 'bizley\migration\controllers\MigrationController',
            'migrationTable' => 'm2',
            'migrationNamespaces' => [
                'common\migrations',
                'frontend\migrations'
            ]
        ],

from yii2-migration.

bizley avatar bizley commented on May 14, 2024

Well, does it work?

from yii2-migration.

vuongminh-xx avatar vuongminh-xx commented on May 14, 2024

It doesn't work :( missing namespace in version problem maybe when generate migration is not prepend namespace? MigrationController L258

from yii2-migration.

bizley avatar bizley commented on May 14, 2024

There is bug when extracting data from classic migrations mixed with namespaced. Generally you shoud not mix both but I can add process for proper handling.

One thing bothers me here. Could you paste here the content of your migration table?

from yii2-migration.

vuongminh-xx avatar vuongminh-xx commented on May 14, 2024

Of course!

untitled

from yii2-migration.

vuongminh-xx avatar vuongminh-xx commented on May 14, 2024

It play well now! Thank you for help 🥇 .

I have a question why we don't skip a migration table in list? Currently it create a migration for migration table and we usually remove it before use.

from yii2-migration.

bizley avatar bizley commented on May 14, 2024

Great!

As for the migration table - it will be ignored in 2.2.1.

from yii2-migration.

bizley avatar bizley commented on May 14, 2024

Migration table is now automatically ignored with version 2.3.0.

from yii2-migration.

Related Issues (20)

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.