Fix duplicte column bug
This commit is contained in:
@ -69,7 +69,7 @@ func cmdDBCreate(cmd *cobra.Command, args []string) {
|
||||
}
|
||||
defer conn.Close(ctx)
|
||||
|
||||
sql := fmt.Sprintf("create database %s", conf.DB.DBName)
|
||||
sql := fmt.Sprintf("CREATE DATABASE %s", conf.DB.DBName)
|
||||
|
||||
_, err = conn.Exec(ctx, sql)
|
||||
if err != nil {
|
||||
@ -94,7 +94,7 @@ func cmdDBDrop(cmd *cobra.Command, args []string) {
|
||||
}
|
||||
defer conn.Close(ctx)
|
||||
|
||||
sql := fmt.Sprintf("drop database if exists %s", conf.DB.DBName)
|
||||
sql := fmt.Sprintf(`DROP DATABASE IF EXISTS %s`, conf.DB.DBName)
|
||||
|
||||
_, err = conn.Exec(ctx, sql)
|
||||
if err != nil {
|
||||
|
@ -75,7 +75,7 @@ func cmdNew(cmd *cobra.Command, args []string) {
|
||||
})
|
||||
|
||||
ifNotExists(path.Join(appConfigPath, "seed.js"), func(p string) error {
|
||||
if v, err := tmpl.get("docker-compose.yml"); err == nil {
|
||||
if v, err := tmpl.get("seed.js"); err == nil {
|
||||
return ioutil.WriteFile(p, v, 0644)
|
||||
} else {
|
||||
return err
|
Reference in New Issue
Block a user