Skip to content

Lucid cascade delete not working with .onDelete('CASCADE') #3342

Answered by akatora28
akatora28 asked this question in Help
Discussion options

You must be logged in to vote

After some digging, found that the issue is related to SQLITE and not in the code, by default SQLITE opens with foreign_keys off, so the solution to turn that on is here: adonisjs/lucid#121

I'm inclined to agree with the poster of that original issue though, that I would expect that configuration option to be included by default in the SQLITE connection settings

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@thetutlage
Comment options

@akatora28
Comment options

Answer selected by akatora28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants