Skip to content

Commit 032c2cb

Browse files
authored
fix: remove deprecated remote changes and commit (#3520)
1 parent 679f873 commit 032c2cb

File tree

3 files changed

+5
-158
lines changed

3 files changed

+5
-158
lines changed

cmd/db.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ import (
1818
"github.com/supabase/cli/internal/db/lint"
1919
"github.com/supabase/cli/internal/db/pull"
2020
"github.com/supabase/cli/internal/db/push"
21-
"github.com/supabase/cli/internal/db/remote/changes"
22-
"github.com/supabase/cli/internal/db/remote/commit"
2321
"github.com/supabase/cli/internal/db/reset"
2422
"github.com/supabase/cli/internal/db/start"
2523
"github.com/supabase/cli/internal/db/test"
@@ -175,7 +173,7 @@ var (
175173
Short: "Show changes on the remote database",
176174
Long: "Show changes on the remote database since last migration.",
177175
RunE: func(cmd *cobra.Command, args []string) error {
178-
return changes.Run(cmd.Context(), schema, flags.DbConfig, afero.NewOsFs())
176+
return diff.Run(cmd.Context(), schema, file, flags.DbConfig, diff.DiffSchemaMigra, afero.NewOsFs())
179177
},
180178
}
181179

@@ -184,7 +182,7 @@ var (
184182
Use: "commit",
185183
Short: "Commit remote changes as a new migration",
186184
RunE: func(cmd *cobra.Command, args []string) error {
187-
return commit.Run(cmd.Context(), schema, flags.DbConfig, afero.NewOsFs())
185+
return pull.Run(cmd.Context(), schema, flags.DbConfig, "remote_commit", afero.NewOsFs())
188186
},
189187
}
190188

@@ -304,10 +302,12 @@ func init() {
304302
dbCmd.AddCommand(dbPullCmd)
305303
// Build remote command
306304
remoteFlags := dbRemoteCmd.PersistentFlags()
305+
remoteFlags.StringSliceVarP(&schema, "schema", "s", []string{}, "Comma separated list of schema to include.")
307306
remoteFlags.String("db-url", "", "Connect using the specified Postgres URL (must be percent-encoded).")
307+
remoteFlags.Bool("linked", true, "Connect to the linked project.")
308+
dbRemoteCmd.MarkFlagsMutuallyExclusive("db-url", "linked")
308309
remoteFlags.StringVarP(&dbPassword, "password", "p", "", "Password to your remote Postgres database.")
309310
cobra.CheckErr(viper.BindPFlag("DB_PASSWORD", remoteFlags.Lookup("password")))
310-
remoteFlags.StringSliceVarP(&schema, "schema", "s", []string{}, "Comma separated list of schema to include.")
311311
dbRemoteCmd.AddCommand(dbRemoteChangesCmd)
312312
dbRemoteCmd.AddCommand(dbRemoteCommitCmd)
313313
dbCmd.AddCommand(dbRemoteCmd)

internal/db/remote/changes/changes.go

Lines changed: 0 additions & 47 deletions
This file was deleted.

internal/db/remote/commit/commit.go

Lines changed: 0 additions & 106 deletions
This file was deleted.

0 commit comments

Comments
 (0)