mirror of
https://github.com/supabase/supabase.git
synced 2026-06-24 20:09:08 +08:00
1009 lines
18 KiB
Plaintext
1009 lines
18 KiB
Plaintext
---
|
|
id: usage
|
|
slug: /usage
|
|
title: Usage
|
|
toc_max_heading_level: 3
|
|
---
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
Supabase CLI provides you with tools to develop your application locally, and deploy your application to the Supabase platform.
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### Stop all local Supabase containers {#supabase-stop}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
```sh
|
|
supabase stop [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for stop
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### Show status of local Supabase containers {#supabase-status}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
```sh
|
|
supabase status [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for status
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### Start containers for Supabase local development {#supabase-start}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
```sh
|
|
supabase start [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for start
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
## Manage Supabase secrets {#supabase-secrets}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Available Commands**
|
|
|
|
- <a href="#supabase-secrets-list">
|
|
<code>supabase secrets list</code>
|
|
</a>
|
|
|
|
- <a href="#supabase-secrets-set">
|
|
<code>supabase secrets set</code>
|
|
</a>
|
|
|
|
- <a href="#supabase-secrets-unset">
|
|
<code>supabase secrets unset</code>
|
|
</a>
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for secrets
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### Unset a secret(s) on Supabase {#supabase-secrets-unset}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
Unset a secret(s) from the linked Supabase project.
|
|
|
|
```sh
|
|
supabase secrets unset <NAME> ... [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for unset
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### Set a secret(s) on Supabase {#supabase-secrets-set}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
Set a secret(s) to the linked Supabase project.
|
|
|
|
```sh
|
|
supabase secrets set [flags] <NAME=VALUE> ...
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
--env-file string Read secrets from a .env file.
|
|
-h, --help help for set
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### List all secrets on Supabase {#supabase-secrets-list}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
List all secrets in the linked project.
|
|
|
|
```sh
|
|
supabase secrets list [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for list
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
## Manage Supabase projects {#supabase-projects}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Available Commands**
|
|
|
|
- <a href="#supabase-projects-create">
|
|
<code>supabase projects create</code>
|
|
</a>
|
|
|
|
- <a href="#supabase-projects-list">
|
|
<code>supabase projects list</code>
|
|
</a>
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for projects
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### List all Supabase projects {#supabase-projects-list}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
List all Supabase projects the logged-in user can access.
|
|
|
|
```sh
|
|
supabase projects list [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for list
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### Create a project on Supabase {#supabase-projects-create}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
```sh
|
|
supabase projects create <project name> [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
--db-password string Database password of the project.
|
|
-h, --help help for create
|
|
-i, --interactive Enables interactive mode.
|
|
--org-id string Organization ID to create the project in.
|
|
--plan string Select a plan that suits your needs. (default "free")
|
|
--region string Select a region close to you for the best performance.
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
## Manage Supabase organizations {#supabase-orgs}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Available Commands**
|
|
|
|
- <a href="#supabase-orgs-list">
|
|
<code>supabase orgs list</code>
|
|
</a>
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for orgs
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### List all organizations {#supabase-orgs-list}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
List all organizations the logged-in user belongs.
|
|
|
|
```sh
|
|
supabase orgs list [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for list
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
## Manage database migration scripts {#supabase-migration}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Available Commands**
|
|
|
|
- <a href="#supabase-migration-list">
|
|
<code>supabase migration list</code>
|
|
</a>
|
|
|
|
- <a href="#supabase-migration-new">
|
|
<code>supabase migration new</code>
|
|
</a>
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for migration
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### Create an empty migration script {#supabase-migration-new}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
```sh
|
|
supabase migration new <migration name> [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for new
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### List local and remote migrations {#supabase-migration-list}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
```sh
|
|
supabase migration list [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for list
|
|
-p, --password string Password to your remote Postgres database.
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### Authenticate using an access token {#supabase-login}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
```sh
|
|
supabase login [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for login
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### Link to a Supabase project {#supabase-link}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
```sh
|
|
supabase link [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for link
|
|
-p, --password string Password to your remote Postgres database.
|
|
--project-ref string Project ref of the Supabase project.
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### Initialize a local project {#supabase-init}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
```sh
|
|
supabase init [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for init
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
## Run code generation tools {#supabase-gen}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Available Commands**
|
|
|
|
- <a href="#supabase-gen-types">
|
|
<code>supabase gen types</code>
|
|
</a>
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for gen
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
## Generate types from Postgres schema {#supabase-gen-types}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Available Commands**
|
|
|
|
- <a href="#supabase-gen-types-typescript">
|
|
<code>supabase gen types typescript</code>
|
|
</a>
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for types
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### Generate types for TypeScript {#supabase-gen-types-typescript}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
Generate types for TypeScript. Must specify either --local or --db-url
|
|
|
|
```sh
|
|
supabase gen types typescript [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
--db-url string Generate types from a database url.
|
|
-h, --help help for typescript
|
|
--local Generate types from the local dev database.
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
## Manage Supabase Edge functions {#supabase-functions}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Available Commands**
|
|
|
|
- <a href="#supabase-functions-delete">
|
|
<code>supabase functions delete</code>
|
|
</a>
|
|
|
|
- <a href="#supabase-functions-deploy">
|
|
<code>supabase functions deploy</code>
|
|
</a>
|
|
|
|
- <a href="#supabase-functions-new">
|
|
<code>supabase functions new</code>
|
|
</a>
|
|
|
|
- <a href="#supabase-functions-serve">
|
|
<code>supabase functions serve</code>
|
|
</a>
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for functions
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### Serve a Function locally {#supabase-functions-serve}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
```sh
|
|
supabase functions serve <Function name> [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
--env-file string Path to an env file to be populated to the Function environment.
|
|
-h, --help help for serve
|
|
--no-verify-jwt Disable JWT verification for the Function.
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### Create a new Function locally {#supabase-functions-new}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
```sh
|
|
supabase functions new <Function name> [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for new
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### Deploy a Function to Supabase {#supabase-functions-deploy}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
Deploy a Function to the linked Supabase project.
|
|
|
|
```sh
|
|
supabase functions deploy <Function name> [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for deploy
|
|
--no-verify-jwt Disable JWT verification for the Function.
|
|
--project-ref string Project ref of the Supabase project.
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### Delete a Function from Supabase {#supabase-functions-delete}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
Delete a Function from the linked Supabase project. This does NOT remove the Function locally.
|
|
|
|
```sh
|
|
supabase functions delete <Function name> [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for delete
|
|
--project-ref string Project ref of the Supabase project.
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
## Manage local Postgres databases {#supabase-db}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Available Commands**
|
|
|
|
- <a href="#supabase-db-branch">
|
|
<code>supabase db branch</code>
|
|
</a>
|
|
|
|
- <a href="#supabase-db-diff">
|
|
<code>supabase db diff</code>
|
|
</a>
|
|
|
|
- <a href="#supabase-db-push">
|
|
<code>supabase db push</code>
|
|
</a>
|
|
|
|
- <a href="#supabase-db-remote">
|
|
<code>supabase db remote</code>
|
|
</a>
|
|
|
|
- <a href="#supabase-db-reset">
|
|
<code>supabase db reset</code>
|
|
</a>
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for db
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### Resets the local database to current migrations {#supabase-db-reset}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
```sh
|
|
supabase db reset [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for reset
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
## Manage remote databases {#supabase-db-remote}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Available Commands**
|
|
|
|
- <a href="#supabase-db-remote-changes">
|
|
<code>supabase db remote changes</code>
|
|
</a>
|
|
|
|
- <a href="#supabase-db-remote-commit">
|
|
<code>supabase db remote commit</code>
|
|
</a>
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for remote
|
|
-p, --password string Password to your remote Postgres database.
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### Commit remote changes as a new migration {#supabase-db-remote-commit}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
```sh
|
|
supabase db remote commit [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for commit
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### Show changes on the remote database {#supabase-db-remote-changes}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
Show changes on the remote database since last migration.
|
|
|
|
```sh
|
|
supabase db remote changes [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for changes
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### Push new migrations to the remote database {#supabase-db-push}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
```sh
|
|
supabase db push [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
--dry-run Print the migrations that would be applied, but don't actually apply them.
|
|
-h, --help help for push
|
|
-p, --password string Password to your remote Postgres database.
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### Diffs the local database for schema changes {#supabase-db-diff}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
```sh
|
|
supabase db diff [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-f, --file string Saves schema diff to a file.
|
|
-h, --help help for diff
|
|
-s, --schema strings List of schema to include. (default [public])
|
|
--use-migra Use migra to generate schema diff.
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
## Manage local database branches {#supabase-db-branch}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
Manage local database branches. Each branch is associated with a separate local database. Forking remote databases is NOT supported.
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Available Commands**
|
|
|
|
- <a href="#supabase-db-branch-create">
|
|
<code>supabase db branch create</code>
|
|
</a>
|
|
|
|
- <a href="#supabase-db-branch-delete">
|
|
<code>supabase db branch delete</code>
|
|
</a>
|
|
|
|
- <a href="#supabase-db-branch-list">
|
|
<code>supabase db branch list</code>
|
|
</a>
|
|
|
|
- <a href="#supabase-db-branch-switch">
|
|
<code>supabase db branch switch</code>
|
|
</a>
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for branch
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### Switch the active branch {#supabase-db-branch-switch}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
```sh
|
|
supabase db branch switch <branch name> [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for switch
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### List branches {#supabase-db-branch-list}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
```sh
|
|
supabase db branch list [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for list
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### Delete a branch {#supabase-db-branch-delete}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
```sh
|
|
supabase db branch delete <branch name> [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for delete
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<br />
|
|
<br />
|
|
|
|
### Create a branch {#supabase-db-branch-create}
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
```sh
|
|
supabase db branch create <branch name> [flags]
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|
|
|
|
**Options**
|
|
|
|
```sh
|
|
-h, --help help for create
|
|
```
|
|
|
|
<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->
|