-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Use a transaction for migrations #43
Conversation
Test failing to compile |
@@ -401,21 +401,21 @@ struct PostgresMigrationRepository: Sendable { | |||
|
|||
let client: PostgresClient | |||
#if compiler(>=6.0) |
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 think we can get rid of these version check since the transaction implementation already has checks for isolating stuff?
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.
That has to be in each async function call
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.
That has to be in each async function call
oh, I see!
try await process(.init(connection: connection, logger: logger)) | ||
} | ||
} | ||
#else | ||
func withContext<Value: Sendable>( |
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.
Do we need to still wrap this code in a closure? see https://github.com/vapor/postgres-nio/pull/538/files
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.
It hides the implementation details a little. I could remove it but not sure it is necessary
No description provided.