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

Exclude tables (and related indexes) owned by extensions #190

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

the-glu
Copy link
Contributor

@the-glu the-glu commented Feb 5, 2025

Description

This PR is similar to #127, but for tables and indexes generated by extensions.

Motivation

I ran into issues with postgis who is creating such tables, this will just ingore them as they are handled by the normal create/delete extension statements.

Testing

Tested locally with postgis :)

@bplunkett-stripe
Copy link
Collaborator

It's unfortunate our testing mixed this! Do you want to try to update our acceptance tests to spot this?

One thought I have:

  1. Install postgis into the Docker.test file
  2. Update this test case to install it and ensure the test case passes

Copy link
Collaborator

@bplunkett-stripe bplunkett-stripe left a comment

Choose a reason for hiding this comment

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

Awesome! See comment about testing

@the-glu
Copy link
Contributor Author

the-glu commented Feb 6, 2025

Hum, unfortunately postgis is dependent on the latest postgres version, when I add it to the Docker file, postgres16 is installed / used, even in POSTGRES_PACKAGE=postgresql14 mode.

I checked for build-in extensions that would add some tables in the public schema, but didn't find any obvious ones.

Would it be fine to skip tests on that one? #127 had the same issue ^^'

@bplunkett-stripe
Copy link
Collaborator

Looks like you need to re-generate the queries! It seems like your local sqlc is a different version, so you only need to commit probably a change in version number. You can alternatively install sqlc 1.18 or mount the docker image to your file system!

@the-glu
Copy link
Contributor Author

the-glu commented Feb 10, 2025

Looks like you need to re-generate the queries! It seems like your local sqlc is a different version, so you only need to commit probably a change in version number. You can alternatively install sqlc 1.18 or mount the docker image to your file system!

Should be fixed :)

Copy link
Collaborator

@bplunkett-stripe bplunkett-stripe left a comment

Choose a reason for hiding this comment

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

Sweet! Going to go ahead and merge!

@bplunkett-stripe bplunkett-stripe merged commit b0ba687 into stripe:main Feb 11, 2025
8 checks passed
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