node-casbin / sequelize-adapter

Sequelize adapter for Casbin
https://github.com/casbin/node-casbin
Apache License 2.0
64 stars 34 forks source link

Add support for custom table name #43

Closed iamhosseindhv closed 3 years ago

iamhosseindhv commented 3 years ago

Hi, thanks for this library ❤️

Would it be possible to support changing the default casbin_rule table name? We have our own convention of table names and at the moment casbin_rule sticks out.

I'm thinking of something like:

const adapter = await SequelizeAdapter.newAdapter({
    username: config.db.username,
    // ...
    tableName: 'not_casbin_rule`
});

Happy to make a PR for it.

hsluoyz commented 3 years ago

Hi @iamhosseindhv , PR is welcome!

hsluoyz commented 3 years ago

@iamhosseindhv released: https://github.com/node-casbin/sequelize-adapter/releases/tag/v2.3.0