Adding Migrate Command (#872)
This commit is contained in:
1 parent
5de4befb58
commit
1f9fcad1cd
25 files changed
+590
-650
No files matched your search
@@ -411,12 +411,11 @@ func (c *Command) Run(args []string) int {
|
||||
c.ShutdownFuncs = append(c.ShutdownFuncs, c.DestroyDevDatabase)
|
||||
}
|
||||
default:
|
||||
dbaseUrl, err := config.ParseAddress(c.flagDatabaseUrl)
|
||||
c.DatabaseUrl, err = config.ParseAddress(c.flagDatabaseUrl)
|
||||
if err != nil && err != config.ErrNotAUrl {
|
||||
c.UI.Error(fmt.Errorf("Error parsing database url: %w", err).Error())
|
||||
return 1
|
||||
}
|
||||
c.DatabaseUrl = strings.TrimSpace(dbaseUrl)
|
||||
if err := c.CreateDevDatabase(c.Context, "postgres"); err != nil {
|
||||
c.UI.Error(fmt.Errorf("Error connecting to database: %w", err).Error())
|
||||
return 1
|
||||
|
||||
Reference in new issue
Block a user