Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use the "InjectedQueryInterface" #488

Closed
nholmes3 opened this issue Jun 13, 2022 · 4 comments
Closed

How to use the "InjectedQueryInterface" #488

nholmes3 opened this issue Jun 13, 2022 · 4 comments

Comments

@nholmes3
Copy link

Hello,

I am currently working with an open source package called Grouparoo that uses the ah-sequelize-plugin. Grouparoo includes a src/config/sequelize.ts file for Sequelize as per your documentation.

Grouparoo uses a Postgres database for its operations and therefore it attempts to provide the ability to pass a non "public" schema as a configuration option. However, when I provide a value that isn't "public" for the schema, one of the migrations
in the Grouparoo project fails because the "addColumn" function in Sequelize is known to be problematic with custom schemas.

It appears that the "ah-sequelize-plugin" tries to solve for that problem by providing a getInjectedQueryInterface function that patches the problematic Sequelize functions.

I have included some custom logging in the compiled files of my project to determine whether or not the getInjectedQueryInterface function ever gets called when the Grouparoo process runs, and I have confirmed that it does not get called. I cannot find any documentation for how to actually make use of the patched QueryInterface. Your documentation alludes to this problem and the attempt at solving it, but does not actually provide instructions for how to use the solution correctly. Any guidance that you can provide would be greatly appreciated.

Thank you and please let me know if I can provide any additional information!

@evantahler
Copy link
Member

Hi @nholmes3!

It looks like we haven't used that code in some time - it stopped being used here (#414). It looks like Umzug changed the method signature drastically at that time. I'm going to remove that code to prevent any confusion.

Can you still reproduce the schema migration problem with just actionhero and ah-sequelize-plugin? If you can, we can figure out how to patch it here.

@evantahler
Copy link
Member

unused code removed via #489

@evantahler
Copy link
Member

Here's a more specific issue. #490. Chime in here if you have any ideas, or can link any docs from Sequelize

@nholmes3
Copy link
Author

Hey @evantahler thanks for getting back to me here. I will add my findings to #490

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants