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

Postgres provisioning fixes #177

Merged
merged 3 commits into from
Sep 15, 2023

Conversation

andrewwhitehead
Copy link
Contributor

For support of Postgres 15 where the CREATE permission isn't automatically granted on the 'public' schema.

Adds a new optional 'schema' parameter for postgres connection URLs (ie. postgres://user:pw@host/db?schema=public). When not set, the schema now defaults to the username when creating new tables.

For new stores,

  • If the database is newly created, then the database owner is set explicitly
  • A new schema is created in the database, with the same name as the user. This is consistent with the default search path: ('$user', public)
  • All tables are created in the specified schema

For existing stores,

  • If the schema isn't specified, then all schemas in the search path are checked for the config table (not just 'public')
  • When the schema is set explicitly in the connection URL, the search path is restricted just to that schema

Fixes #129 ?

TimoGlastra
TimoGlastra previously approved these changes Sep 8, 2023
@andrewwhitehead
Copy link
Contributor Author

#178 should fix the test failure on Windows and it might be best to merge that PR first.

Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
…schema for new postgres stores

Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
@TimoGlastra TimoGlastra merged commit 7537214 into openwallet-foundation:main Sep 15, 2023
26 checks passed
jamshale pushed a commit to jamshale/askar that referenced this pull request Aug 18, 2024
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.

Problems installing ACA-Py using Askar on Postgres 15+ on OpenShift/Container Orchestration Platforms
2 participants