-
Notifications
You must be signed in to change notification settings - Fork 11
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
Update handling of unlogged tables as per 2024.2 #2074
Conversation
assert.NoError(t, err) | ||
|
||
defer conn.Close(context.Background()) | ||
_, err = conn.Exec(ctx, "CREATE UNLOGGED TABLE unlogged_table (a int)") | ||
// in 2024.2, UNLOGGED no longer throws an error, just a notice | ||
if noticeFound { |
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 see you have changed the assertion to assert based on target-db-version if its fixed or not, but should we also keep the notice found check also?
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 didn't see the point of keeping the notice check around. we are anyway printing all notices for all DDLs that are run. So we just need to now test that it does not throw any error. RIght?
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.
Hmm, okay.
migtests/tests/pg/assessment-report-test/expectedAssessmentReport.json
Outdated
Show resolved
Hide resolved
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.
LGTM!
assert.NoError(t, err) | ||
|
||
defer conn.Close(context.Background()) | ||
_, err = conn.Exec(ctx, "CREATE UNLOGGED TABLE unlogged_table (a int)") | ||
// in 2024.2, UNLOGGED no longer throws an error, just a notice | ||
if noticeFound { |
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.
Hmm, okay.
Describe the changes in this pull request
Describe if there are any user-facing changes
import-schema output will now have the NOTICEs printed out if received from psql.
How was this pull request tested?
Does your PR have changes that can cause upgrade issues?