node-casbin / sequelize-adapter

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

how long to start support v6 #34

Closed fish0373 closed 3 years ago

fish0373 commented 4 years ago

how long to start support v6

hsluoyz commented 4 years ago

@nodece @stu01509

stu01509 commented 4 years ago

Hi @fish0373

Did you mean the npm package.js sequelize version? If so I will create the PR to upgrade that.

fish0373 commented 4 years ago

yes, sequelize current version is v6 v5 is plan to deprecated I wish this project can be support v6 thanks

hsluoyz commented 4 years ago

@nodece @stu01509 please update it.

hsluoyz commented 3 years ago

We had some previous work at: https://github.com/node-casbin/sequelize-adapter/pull/35

And now we are resurrecting this issue.

hsluoyz commented 3 years ago

@fish0373 Quote @zhmushan

We need to wait for "sequelize-typescript" to release 2.0.0
hsluoyz commented 3 years ago

@fish0373 BTW, you can use: https://github.com/node-casbin/js-sequelize-adapter instead

hsluoyz commented 3 years ago

Hope someone will take this issue: https://github.com/node-casbin/js-sequelize-adapter/issues/11

fish0373 commented 3 years ago

Thanks But, when I update it, I got another problem. It happened on function getQueryInterface. My typescript version is 4.1.2. maybe I need to enable some compiler options? [

截圖 2020-12-28 上午10 17 09

](url)

hsluoyz commented 3 years ago

@fish0373 which adapter repo did you use?

fish0373 commented 3 years ago

casbin 5.2.0 casbin-sequelize-adapter 2.1.0 sequelize 6.3.5

hsluoyz commented 3 years ago

@fish0373 can you try https://github.com/node-casbin/js-sequelize-adapter ?

fish0373 commented 3 years ago

I try js-sequelize-adapter but it not support typescript type casting when I import then it make some problem and I require it then type always is Any type

nodece commented 3 years ago

@fish0373 The library only supports sequelize 5.x, we will support sequelize 6.x in next version.

hsluoyz commented 3 years ago

@fish0373

We can try latest sequelize-typescript 2.0.0-beta.1 (a month ago) with sequelize >=6.2, see: https://github.com/RobinBuschmann/sequelize-typescript/pull/856

image

hsluoyz commented 3 years ago

Some update: https://github.com/RobinBuschmann/sequelize-typescript/issues/876

hsluoyz commented 3 years ago

@divy9881 can you have a look at this?

Yash-g17 commented 3 years ago

@hsluoyz @nodece i installed the new versions of "sequelize": "^6.6.2", "sequelize-typescript": "^2.1.0" , Then I ran the yarn test function, it first gave me a mysql error which i resolved by starting the mysql server on my local machine , now it expects me to have a database names casbin can you please guide me through the testing phase of the changes I've made.

hsluoyz commented 3 years ago

@nodece

nodece commented 3 years ago

@Yash-g17 you need to create a database named casbin in mysql tool database by create database casbin command.

Yash-g17 commented 3 years ago

@nodece Thanks , that worked Creating a pull request now

hsluoyz commented 3 years ago

PR reverted for: https://github.com/node-casbin/sequelize-adapter/pull/39#issuecomment-812986250