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

PostgresDatabaseMigrator Wrong Order #5187

Closed
Ogrvat opened this issue May 14, 2024 · 1 comment
Closed

PostgresDatabaseMigrator Wrong Order #5187

Ogrvat opened this issue May 14, 2024 · 1 comment
Labels
Close Pending Will be closed soon lacking any further updates Needs More Information SQL Transport

Comments

@Ogrvat
Copy link

Ogrvat commented May 14, 2024

Contact Details

[email protected]

Version

8.x (develop, pre-release), 8.x

On which operating system(s) are you experiencing the issue?

Linux

Using which broker(s) did you encounter the issue?

No response

What are the steps required to reproduce the issue?

Wrong SQL scripts order in PostgresDatabaseMigrator:
https://github.com/MassTransit/MassTransit/blob/4fe74cde9368b910f39f990edb0bfbbc605bccaf/src/Transports/MassTransit.SqlTransport.PostgreSql/SqlTransport/PostgreSql/PostgresDatabaseMigrator.cs#L22-L23

Current:
ALTER SCHEMA "{1}" OWNER TO "{0}";
GRANT "{0}" TO "{2}";

Expected:
GRANT "{0}" TO "{2}";
ALTER SCHEMA "{1}" OWNER TO "{0}";

Can't change owner without grant.

What is the expected behavior?

.

What actually happened?

.

Related log output, including any exceptions

No response

Link to repository that demonstrates/reproduces the issue

No response

@phatboyg
Copy link
Member

You'd need to provide a specific scenario where this fails because it works everywhere I've tried it.

Note that you should not be using the same username as the admin username.

@phatboyg phatboyg added Needs More Information SQL Transport Close Pending Will be closed soon lacking any further updates labels May 14, 2024
@phatboyg phatboyg closed this as not planned Won't fix, can't repro, duplicate, stale May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Close Pending Will be closed soon lacking any further updates Needs More Information SQL Transport
Projects
None yet
Development

No branches or pull requests

2 participants