supabase / setup-cli

A GitHub action for interacting with your Supabase projects using the CLI.
MIT License
120 stars 16 forks source link

CI Migrations & vector extension #135

Closed mosnicholas closed 1 year ago

mosnicholas commented 1 year ago

Describe the bug

Getting an error trying to run migrations the recommended way through Github actions. I recently enabled the vector extension, and seeing the migration fail.

Applying migration 20230209001317_embeddings.sql...
Error: ERROR: extension "vector" is not available (SQLSTATE 0A000)
At statement 0: create extension if not exists "vector" with schema "public" version '0.4.0'

To Reproduce

  1. Follow steps here to setup CI based migrations.
  2. Enable the vector extension (or add to your initial migration file the line: create extension if not exists "vector" with schema "public" version '0.4.0';).
  3. Push to github

Expected behavior

It should work, instead the GitHub action fails with the error message posted above

System information

sweatybridge commented 1 year ago

Hi @mosnicholas, the default CLI version installed by this action does not have the latest features. Could you try specifying the latest version instead?

- uses: supabase/setup-cli@v1
  with:
    version: latest