-
-
Notifications
You must be signed in to change notification settings - Fork 16
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 keys in pool? #54
Comments
More info,
|
https://github.com/zombiezen/go-sqlite3/blob/foreignkeys/sqlite3.go#L546 Ah, go-sqlite3 !- go-sqlite.... looks like the crawshaw based driver doesn't have the same support for setting pragmas in opening. Would be great if it did :p |
@zombiezen bump? |
Apologies, I've had a lot going on the last few months.
|
I'm not sure whether this is what you were originally encountering, but I hit a related issue with the |
Yeah it's was from sqlmigration thx |
I'm not using migrations, just sqlitex.Pool, but I think I'm hitting the same issue where need to manually run the pragma for each connection. Can PrepareConn, or something similar, be added to sqlitex.Pool? |
@benbarbour The feature you're requesting is #65, which will be available in the next release. |
I have a write pool of 1 via
This shows the connect does have
foreign_keys
set, however it errors on the last line. I think this is an error in migration. However it brings up another note, is there a way to set per connection pragmas when using the pool?The docs say
| Foreign key constraints are disabled by default (for backwards compatibility), so must be enabled separately for each database connection.
PS)
_foreign_keys=1
doesn't have an effect and I noticed it in mattn/go-sqlite3#407 but had to explicitly set it to see the effect. I would think this get used per connection but its not really documented anywhere.The text was updated successfully, but these errors were encountered: