Skip to content

Commit 30086c2

Browse files
Merge pull request #813 from planetscale/remove-webdb
Remove --web from database create. is unused
2 parents 1b18b74 + 306ff8b commit 30086c2

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

internal/cmd/database/create.go

-17
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@ package database
22

33
import (
44
"fmt"
5-
"net/url"
65

76
"github.com/planetscale/cli/internal/cmdutil"
87
"github.com/planetscale/cli/internal/printer"
98

109
ps "github.com/planetscale/planetscale-go/planetscale"
1110

12-
"github.com/pkg/browser"
1311
"github.com/spf13/cobra"
1412
)
1513

@@ -23,10 +21,6 @@ func CreateCmd(ch *cmdutil.Helper) *cobra.Command {
2321
Args: cmdutil.RequiredArgs("database"),
2422
RunE: func(cmd *cobra.Command, args []string) error {
2523
ctx := cmd.Context()
26-
web, err := cmd.Flags().GetBool("web")
27-
if err != nil {
28-
return err
29-
}
3024

3125
plan, err := cmd.Flags().GetString("plan")
3226
if err != nil {
@@ -45,15 +39,6 @@ func CreateCmd(ch *cmdutil.Helper) *cobra.Command {
4539
createReq.Organization = ch.Config.Organization
4640
createReq.Name = args[0]
4741

48-
if web {
49-
ch.Printer.Println("🌐 Redirecting you to create a database in your web browser.")
50-
err := browser.OpenURL(fmt.Sprintf("%s/%s?name=%s&showDialog=true", cmdutil.ApplicationURL, ch.Config.Organization, url.QueryEscape(createReq.Name)))
51-
if err != nil {
52-
return err
53-
}
54-
return nil
55-
}
56-
5742
client, err := ch.Client()
5843
if err != nil {
5944
return err
@@ -124,7 +109,5 @@ func CreateCmd(ch *cmdutil.Helper) *cobra.Command {
124109
return plans, cobra.ShellCompDirectiveDefault
125110
})
126111

127-
cmd.Flags().BoolP("web", "w", false, "Create a database in your web browser")
128-
129112
return cmd
130113
}

0 commit comments

Comments
 (0)