Skip to content

Commit 9a4fe4f

Browse files
committed
supabase-add
1 parent 72239e3 commit 9a4fe4f

17 files changed

Lines changed: 1887 additions & 76 deletions

File tree

cmd/add.go

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package cmd
2+
3+
import (
4+
"github.com/spf13/afero"
5+
"github.com/spf13/cobra"
6+
"github.com/supabase/cli/internal/add"
7+
)
8+
9+
var (
10+
templateInputs []string
11+
12+
addCmd = &cobra.Command{
13+
GroupID: groupLocalDev,
14+
Use: "add <template-url-or-path>",
15+
Short: "Add a template package to your project",
16+
Args: cobra.ExactArgs(1),
17+
RunE: func(cmd *cobra.Command, args []string) error {
18+
return add.Run(cmd.Context(), args[0], templateInputs, afero.NewOsFs())
19+
},
20+
}
21+
)
22+
23+
func init() {
24+
flags := addCmd.Flags()
25+
flags.StringArrayVarP(&templateInputs, "input", "i", []string{}, "Set template input values as key=value.")
26+
rootCmd.AddCommand(addCmd)
27+
}

docs/supabase/db/pull.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ Requires your local project to be linked to a remote database by running `supaba
99
Optionally, a new row can be inserted into the migration history table to reflect the current state of the remote database.
1010

1111
If no entries exist in the migration history table, `pg_dump` will be used to capture all contents of the remote schemas you have created. Otherwise, this command will only diff schema changes against the remote database, similar to running `db diff --linked`.
12+
13+
When using `--experimental`, SQL objects are written as declarative schema files. You can customize where new schema files are written via `[db.migrations.schema_placement]` in `supabase/config.toml`, while `[db.migrations].schema_paths` still controls execution order.

0 commit comments

Comments
 (0)