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

Enable foreign key support in SQLite #745

Merged
merged 1 commit into from
Nov 20, 2021

Conversation

akatora28
Copy link
Contributor

SQLite does not enforce foreign key constraints on cascade deletes / updates by default, this can be turned on with the PRAGMA foreign_keys=true command, but that must be run each time a database connection is established. This changes the default SQLite connection to enable foreign key support so that .onDelete() and .onUpdate methods work as expected

SQLite does not enforce foreign key constraints on cascade deletes / updates by default, this can be turned on with the PRAGMA foreign_keys=true command, but that must be run each time a database connection is established. This changes the default SQLite connection to enable foreign key support so that .onDelete() and .onUpdate methods work as expected
@thetutlage thetutlage merged commit 87ce418 into adonisjs:develop Nov 20, 2021
@thetutlage
Copy link
Member

Thanks 👍

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

Successfully merging this pull request may close these issues.

2 participants