-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add foreign key support for sqlite #94
Conversation
WIP because its tests will break after #81 is merged. |
Current coverage is 79.64%@@ master #94 diff @@
==========================================
Files 27 27
Lines 906 958 +52
Methods 0 0
Messages 0 0
Branches 83 91 +8
==========================================
+ Hits 717 763 +46
- Misses 163 166 +3
- Partials 26 29 +3
|
@sbo ready for review again |
@@ -90,6 +93,14 @@ class Accounting(Base): | |||
application_policy = relationship("ApplicationPolicy") | |||
|
|||
|
|||
@event.listens_for(Engine, "connect") | |||
def set_sqlite_pragma(dbapi_connection, connection_record): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import sqlite3 here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would call it _enable_foreign_keys()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the function name _set_sqlite_pragma
so that sphinx would skip it. It is the place where future pragma can be added though so I kept the rest of the name
codecov irrelevant. merging |
Fix #56