Skip to content

Commit f5aa90b

Browse files
Merge pull request #828 from planetscale/import-scaler-pro-updates
Update import to use scaler pro
2 parents 63c62e2 + 8421719 commit f5aa90b

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ require (
2323
github.com/mitchellh/go-homedir v1.1.0
2424
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8
2525
github.com/pkg/errors v0.9.1
26-
github.com/planetscale/planetscale-go v0.95.0
26+
github.com/planetscale/planetscale-go v0.96.0
2727
github.com/planetscale/psdb v0.0.0-20240109164348-6848e728f6e7
2828
github.com/planetscale/psdbproxy v0.0.0-20240202125557-53fac1923f5a
2929
github.com/spf13/cobra v1.8.0

go.sum

+4
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ github.com/planetscale/noglog v0.2.1-0.20210421230640-bea75fcd2e8e h1:MZ8D+Z3m2v
120120
github.com/planetscale/noglog v0.2.1-0.20210421230640-bea75fcd2e8e/go.mod h1:hwAsSPQdvPa3WcfKfzTXxtEq/HlqwLjQasfO6QbGo4Q=
121121
github.com/planetscale/planetscale-go v0.95.0 h1:7GFazNrmi2X1KnBiexflzYl8CIqRi/naOp2Js+Kf17w=
122122
github.com/planetscale/planetscale-go v0.95.0/go.mod h1:hDSA/dClhuKuW8dNhKN9vQW8E5fo034Rb6qGTf86/yI=
123+
github.com/planetscale/planetscale-go v0.95.1-0.20240212163503-b54ee9dbabf4 h1:BK2+iO1gGH3+ZSfyZ83gXy05/NYb0KA6FkfzGEknZUg=
124+
github.com/planetscale/planetscale-go v0.95.1-0.20240212163503-b54ee9dbabf4/go.mod h1:LBArqb3ao+9PVDKKVLyv3BCivRQ5u6rH1FXfjmd2TEs=
125+
github.com/planetscale/planetscale-go v0.96.0 h1:WXAWIHa3mY0deAJG131TGpIW7S5p+Q01DWm18215E8Q=
126+
github.com/planetscale/planetscale-go v0.96.0/go.mod h1:LBArqb3ao+9PVDKKVLyv3BCivRQ5u6rH1FXfjmd2TEs=
123127
github.com/planetscale/psdb v0.0.0-20240109164348-6848e728f6e7 h1:dxdoFKWVDlV1gq8UQC8NWCofLjCEjEHw47gfeojgs28=
124128
github.com/planetscale/psdb v0.0.0-20240109164348-6848e728f6e7/go.mod h1:WZmi4gw3rOK+ryd1inGxgfKwoFV04O7xBCqzWzv0/0U=
125129
github.com/planetscale/psdbproxy v0.0.0-20240202125557-53fac1923f5a h1:/QkOv5uL72UcyvXW6kIdJ+izpBSPd27GNcgPBi0G36Q=

internal/cmd/database/create.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func CreateCmd(ch *cmdutil.Helper) *cobra.Command {
7171
cmd.Flags().MarkDeprecated("notes", "is no longer available.")
7272
cmd.Flags().StringVar(&createReq.Region, "region", "", "region for the database")
7373

74-
cmd.Flags().String("plan", "", "plan for the database. Options: hobby, scaler, or scaler_pro")
74+
cmd.Flags().String("plan", "", "plan for the database. Options: hobby or scaler_pro")
7575
cmd.Flags().String("cluster-size", "", "cluster size for Scaler Pro databases. Options: PS_10, PS_20, PS_40, PS_80, PS_160, PS_320, PS_400")
7676

7777
cmd.RegisterFlagCompletionFunc("region", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {

internal/cmd/dataimports/lint.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ func LintExternalDataSourceCmd(ch *cmdutil.Helper) *cobra.Command {
8585
end()
8686

8787
ch.Printer.Printf("Database %s hosted at %s is compatible and can be imported into PlanetScale!\n", flags.database, flags.host)
88-
if resp.SuggestedBillingPlan == ps.ScalerPlan {
89-
ch.Printer.Printf("\nIf you choose to continue, the imported database will be on Scaler plan. The monthly cost is %v.\n", printer.BoldYellow("$29"))
88+
if resp.SuggestedBillingPlan == ps.ScalerProPlan {
89+
ch.Printer.Println("\nIf you choose to continue, the imported database will be on Scaler Pro with a PS-10.")
9090
}
9191
return nil
9292
},

internal/cmd/dataimports/start.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,15 @@ func StartDataImportCmd(ch *cmdutil.Helper) *cobra.Command {
9090
return errors.New(sb.String())
9191
}
9292
ch.Printer.Printf("Database %s is compatible and can be imported into PlanetScale database %s\n", printer.BoldBlue(flags.database), printer.BoldGreen(flags.name))
93-
if resp.SuggestedBillingPlan == ps.ScalerPlan {
94-
ch.Printer.Printf("If you choose to continue, the imported database will be on Scaler plan. The monthly cost is %v.\n", printer.BoldYellow("$29"))
93+
if resp.SuggestedBillingPlan == ps.ScalerProPlan {
94+
ch.Printer.Println("If you choose to continue, the imported database will be on Scaler Pro with a PS-10.")
9595
}
9696
if flags.dryRun {
9797
ch.Printer.Println("Please run this command with --dry-run=false to start the import")
9898
return nil
9999
}
100-
if resp.SuggestedBillingPlan == ps.ScalerPlan {
101-
confirmationName := "$29"
100+
if resp.SuggestedBillingPlan == ps.ScalerProPlan {
101+
confirmationName := "start"
102102
confirmError := ch.Printer.ConfirmCommand(confirmationName, "import", "import into PlanetScale")
103103
if confirmError != nil {
104104
return confirmError

0 commit comments

Comments
 (0)