Sitelet https://web.archive.org/web/20210403070238/https://github.com/knex/knex/issues/4292
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

Please support "DEFERRABLE INITIALLY DEFERRED" #4292

Open
yodhcn opened this issue Feb 13, 2021 · 4 comments · May be fixed by #4373
Open

Please support "DEFERRABLE INITIALLY DEFERRED" #4292

yodhcn opened this issue Feb 13, 2021 · 4 comments · May be fixed by #4373

Comments

@yodhcn
Copy link

@yodhcn yodhcn commented Feb 13, 2021

Feature request

Is there any chance to have a Knex native way to set "DEFERRABLE INITIALLY DEFERRED" on a table with foreign key constraints ?

knex.schema.table('users', function (table) {
  table.integer('user_id').unsigned()
  table.foreign('user_id').references('Items.user_id_in_items').deferred().
})
@kibertoad
Copy link
Collaborator

@kibertoad kibertoad commented Feb 13, 2021

@yodhcn PR for this would be most welcome, and if you need any help with finding the right spot in source or writing tests, would be more than happy to help.

@Alucard17
Copy link
Contributor

@Alucard17 Alucard17 commented Mar 9, 2021

hey @kibertoad can I take this issue?

@kibertoad
Copy link
Collaborator

@kibertoad kibertoad commented Mar 9, 2021

@Alucard17 Please do!

@Alucard17
Copy link
Contributor

@Alucard17 Alucard17 commented Mar 13, 2021

hey @yodhcn can you provide the compiled SQL query of above mentioned example.

@Alucard17 Alucard17 linked a pull request that will close this issue Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants