Git Product home page Git Product logo

Comments (4)

abhi1693 avatar abhi1693 commented on July 22, 2024

I think the issue is that when you remove the plugin it doesn't clean the all the tables properly and when you try reinstalling the plugin, this error is thrown. I had to manually remove all the columns injected by the plugin to make this work.

from userextended.

ShawnClake avatar ShawnClake commented on July 22, 2024

Yea, I was struggling with this a few months ago and I was hoping I had fixed it. It has to do with the original tables structure having two primary keys and the DB migration scripts not playing nicely with that.

Thanks for the report, I will look into a way to solve this problem later today. I may end up just creating a separate users_groups table rather than trying to inject a column.

from userextended.

ShawnClake avatar ShawnClake commented on July 22, 2024

Potential fix: Creating a migration which drops the the users_groups and user_groups table and rebuilds them from scratch. On artisan down, it will drop the tables again, and create them exactly how Rainlab.User creates them.

This should provide compatibility with other plugins and features which utilize existing Rainlab user_groups models as well as migrations.

Drawback:

  • It will remove any existing groups relations in the application at the time of installing the plugin.

I've coded this up and pushed to the pre-release branch.

from userextended.

ShawnClake avatar ShawnClake commented on July 22, 2024

Ran a fresh install test on this and then ran php artisan plugin:refresh on the UserExtended plugin. The solution above seems to have fixed the problem.

from userextended.

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.