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

Foreign Key Constraints are disabled #49

Closed
ezcoding opened this issue Jan 22, 2015 · 1 comment
Closed

Foreign Key Constraints are disabled #49

ezcoding opened this issue Jan 22, 2015 · 1 comment
Labels

Comments

@ezcoding
Copy link

When trying to set a foreign key for a column an assertion fails with the message:
assertion failed: foreign key constraints are disabled

Are they disabled by default? If yes, how can I enable them?
Thank you for this lib. It is awesome btw ;)

@stephencelis
Copy link
Owner

Please see https://www.sqlite.org/foreignkeys.html#fk_enable for more information. (Note that you'll have to enable it per database connection at this time, so if you call Database() multiple times in your app, you'll need to execute the given statement, as well.)

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

No branches or pull requests

2 participants