supabase/dbdev

Unable to publish second version of an extension

tiniscule opened this issue · 1 comments

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 aws/pg_tle#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: usebasejump/supabase-test-helpers#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

  • OS: MacOS
  • dbdev: 0.1.2

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