Skip to content

Conversation

@wowi42
Copy link
Contributor

@wowi42 wowi42 commented Mar 24, 2025

  • Updated the SQL command in PostgresDatabases to include the database owner.
  • Modified the database operation to handle owner updates and added logic for skipping existing databases with specific attributes.
  • Added a new test case for updating database ownership in the operations tests.

wowi42 added 8 commits March 24, 2025 19:10
- Updated the SQL command in PostgresDatabases to include the database owner.
- Modified the database operation to handle owner updates and added logic for skipping existing databases with specific attributes.
- Added a new test case for updating database ownership in the operations tests.
…ation logic

- Updated SQL command formatting in PostgresDatabases for better readability.
- Simplified string formatting in the database operation to enhance clarity and maintainability.
- Implemented a check to prevent re-creation of databases with the same parameters, enhancing idempotency in the database operation.
- Added a noop message to inform users when a database already exists with the specified attributes.
- Added checks to ensure the tablespace is only altered if it differs from the current configuration, improving the idempotency of the database operation.
- Updated the conditional logic for setting the tablespace to enhance clarity and maintainability.
- Added a new 'tablespace' parameter to the database update JSON configuration.
- Updated the SQL command to set the tablespace along with the database owner, enhancing the database operation's functionality.
Copy link
Member

@Fizzadar Fizzadar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh this is really nice @wowi42, thank you!

@Fizzadar Fizzadar changed the base branch from 3.x to kalvad-postgres-db March 27, 2025 11:45
@Fizzadar Fizzadar merged commit 2651df0 into pyinfra-dev:kalvad-postgres-db Mar 27, 2025
23 checks passed
Copy link
Member

@Fizzadar Fizzadar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR, @wowi42! Merged alongside a couple of minor tweaks in 4c4d7d4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants