Skip to content

Conversation

@imor
Copy link
Contributor

@imor imor commented Aug 4, 2025

This PR:

  • Updates the docs to deprecate the in-database client. Also updates the docs to include changes in the dbdev add command.
  • Updates links in the database.dev from in-db client to the dbdev cli.
  • Enhances the dbdev add command to generate a migration file by reading data from the database.dev API. Before this PR only packages from local files could be used to generate a migration file. Data retrieved from the API is written into a temp folder to regenerate the package locally and then existing code to generate the migration file from a local package is used.
  • Also allows a user to specify the version and schema in the dbdev add command which will be used in the create extension <extension> <schema> <version> command emitted in the migration file.
  • Updates installation instructions on database.dev's with the dbdev add command:
image

The new command is: dbdev add -c "postgresql://postgres:[YOUR-PASSWORD]@[YOUR-HOST]:5432/postgres" -o ./migrations -s extensions -v 1.1.1 package -n "langchain@hybrid_search"

@vercel
Copy link

vercel bot commented Aug 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dbdev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 5, 2025 11:22am

@supabase
Copy link

supabase bot commented Aug 4, 2025

This pull request has been ignored for the connected project xmuptpplfviifrbwmmtv because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@imor imor marked this pull request as ready for review August 4, 2025 11:21
Once the prerequisites are met, you can create a migration file to install a TLE available on database.dev by running the following dbdev command:

```bash
dbdev add -c <postgres_connection_string> -o <migration_folder_path> package -n <package_name>
Copy link
Contributor

Choose a reason for hiding this comment

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

why is the postgres connection string needed for this?

I expected it'd produce a SQL script which could then be copied into the migrations directory vs do anything with a live instance

then they'd run the supabase migrations in the usual way to install it. That'd keep the tools decoupled

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The problem is with updates. If someone has installed an existing version and wants to update to a newer version of a package, the newly generated migration file has to only include calls to pg_tle API for newer versions/upgrade paths. The connection to Postgres is used to figure out which versions and upgrade paths already exist in the database and include only those in the migration file.

What we probably can do is to make the postgres connection optional. If it is not supplied, we assume that the migration file has to be generated for first time installation. If it is supplied then we handle the update case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made the connection optional for initial installation and omitted it from database.dev website pages and updated docs to explain that it is only needed to generate update migration scripts.

@imor imor merged commit e723d1d into master Aug 5, 2025
8 checks passed
@imor imor deleted the rs/remove-dbdev-cli branch August 5, 2025 14:51
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.

3 participants