supabase / dbdev

Database Package Registry for Postgres
https://database.dev/
Apache License 2.0
370 stars 19 forks source link

Unable to publish second version of an extension #121

Closed tiniscule closed 12 months ago

tiniscule commented 12 months ago

Bug report

Describe the bug

Running dbdev install locally to test the plugin will correctly install one version of the extension correctly, but fail if there is a second version available. removing all but one version works as expected. I thought it might be https://github.com/aws/pg_tle/issues/186, but that appears to be included in the version of pg_tle shipped with supabase already.

This might be user error, but I'm unable to find a path around it.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Have an extension with 2 versions available (included below)
  2. Make sure your extension is uninstalled by running SELECT pgtle.uninstall_extension_if_exists('supabase_test_helpers');
  3. Confirm it's no longer installed by running SELECT * FROM pgtle.available_extension_versions();
  4. With supabase running locally, run dbdev install --connection postgresql://postgres:postgres@localhost:54322/postgres --path .

Here's my current PR with the changes: https://github.com/usebasejump/supabase-test-helpers/pull/13

Expected behavior

I'd expect both 0.0.1 and 0.0.2 to be correctly installed through pg_tle. It appears to be installing 0.0.2 correctly and then failing on 0.0.1 saying it already exists

Screenshots

image image

System information

imor commented 12 months ago

Hi @tiniscule, thanks for reporting. I'm working on a fix for this.