GithubHelp home page GithubHelp logo

Comments (3)

toupeira avatar toupeira commented on July 18, 2024 1

@truongnmt thanks for the report! 👍

So the foreign key is indeed optional, but protects against accidental data inconsistency, and helps surface bugs like this 😁

I'm happy to switch to dependent: :destroy in Doorkeeper::OpenidConnect::AccessGrant, but it looks like we also need to use :destroy in Doorkeeper::Application. Can you open a corresponding issue in https://github.com/doorkeeper-gem/doorkeeper and ping me there?

from doorkeeper-openid_connect.

toupeira avatar toupeira commented on July 18, 2024 1

This has come up on GitLab as well: https://gitlab.com/gitlab-org/gitlab/merge_requests/19617

The solution there was to use ON DELETE CASCADE, which is much cleaner and seems to be supported on PostgreSQL/MySQL/SQLite. So I'm planning to add a migration to this gem soon to change the foreign key.

from doorkeeper-openid_connect.

toupeira avatar toupeira commented on July 18, 2024

As discussed in doorkeeper-gem/doorkeeper#1311, it's tricky to switch to dependent: destroy_all in Doorkeeper::Application due to performance concerns.

But I'm happy to accept a PR which implements a monkey-patch along the lines of doorkeeper-gem/doorkeeper#1311 (comment).

from doorkeeper-openid_connect.

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.