• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / cli / 3572813994

04 Dec 2022 06:36PM UTC coverage: 54.923% (-2.8%) from 57.76%
3572813994

Pull #648

github

Kevin Saliou
chore: remove all tabs & trailing spaces from SQL files
Pull Request #648: chore: remove all tabs & trailing spaces from SQL files

3057 of 5566 relevant lines covered (54.92%)

498.14 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

64.71
/cmd/migration.go
1
package cmd
2

3
import (
4
        "os"
5

6
        "github.com/spf13/afero"
7
        "github.com/spf13/cobra"
8
        "github.com/spf13/viper"
9
        "github.com/supabase/cli/internal/migration/list"
10
        "github.com/supabase/cli/internal/migration/new"
11
)
12

13
var (
14
        migrationCmd = &cobra.Command{
15
                GroupID: groupLocalDev,
16
                Use:     "migration",
17
                Short:   "Manage database migration scripts",
18
        }
19

20
        migrationListCmd = &cobra.Command{
21
                Use:   "list",
22
                Short: "List local and remote migrations",
23
                RunE: func(cmd *cobra.Command, args []string) error {
×
24
                        password := viper.GetString("DB_PASSWORD")
×
25
                        if password == "" {
×
26
                                password = PromptPassword(os.Stdin)
×
27
                        }
×
28
                        return list.Run(cmd.Context(), username, password, database, afero.NewOsFs())
×
29
                },
30
        }
31

32
        migrationNewCmd = &cobra.Command{
33
                Use:   "new <migration name>",
34
                Short: "Create an empty migration script",
35
                Args:  cobra.ExactArgs(1),
36
                RunE: func(cmd *cobra.Command, args []string) error {
1✔
37
                        return new.Run(args[0], os.Stdin, afero.NewOsFs())
1✔
38
                },
1✔
39
        }
40
)
41

42
func init() {
34✔
43
        flags := migrationListCmd.Flags()
34✔
44
        flags.StringVarP(&dbPassword, "password", "p", "", "Password to your remote Postgres database.")
34✔
45
        cobra.CheckErr(viper.BindPFlag("DB_PASSWORD", flags.Lookup("password")))
34✔
46
        migrationCmd.AddCommand(migrationListCmd)
34✔
47
        migrationCmd.AddCommand(migrationNewCmd)
34✔
48
        rootCmd.AddCommand(migrationCmd)
34✔
49
}
34✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc