Giter VIP home page Giter VIP logo

casbin-pg-adapter's People

Contributors

cychiuae avatar kilosonc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

casbin-pg-adapter's Issues

Please don't change tags randomly, that change broke my dependencies

I woke up today to see our CI was failing:

github.com/casbin/[email protected]: invalid version: unknown revision v0.1.5

Seems for some reason you changed versions to remove the 0.1.5 for 0.0.5.

Please don't rewrite tag history as go mod depends on that for versioning and managing dependencies, and on top of that it defeats the purpose of using versioning in the first place.

Failed to create index

I'm using DB with some schemas.
How can I create new cabin table in a schema DB?
I tried and got an error message:
with tableName = "ABC.auth_permission"
Cannot create index for column: p_type. Error: pq: syntax error at or near "."

Index query like: CREATE INDEX IF NOT EXISTS idx_ABC.auth_permission_p_type ON ABC.auth_permission (p_type)

Please help to fix it. Thanks!

Add PK or set replication identity

Since the table that is created does not have a PK, it's impossible to do DELETE/UPDATE statements on it in case the DB instance has a publication set for ALL TABLES (https://www.postgresql.org/docs/current/logical-replication-publication.html). This is not uncommon in more complex environments.

In order to prevent people from having to fix the table created by this adapter, I would propose either adding a PK to it or setting the REPLICA IDENTITY to FULL. If you go with the PK, you could either do it on the full row (not sure if there are any bad side effects from that) or simply add an ID column (seems a bit useless perhaps). Setting the REPLICA IDENTITY can be done using ALTER TABLE ... REPLICA IDENTITY FULL.

Thanks!

This looks really nice! Thanks for the effort, you just saved me a ton of time :)

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.