-
-
Couldn't load subscription status.
- Fork 25
chore: deprecate in-db client and enhance dbdev add command
#276
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
docs/install-a-package.md
Outdated
| 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> |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
This PR:
dbdev addcommand.dbdev addcommand 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.dbdev addcommand which will be used in thecreate extension <extension> <schema> <version>command emitted in the migration file.dbdev addcommand: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"