We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d54fe40 commit bfaa68eCopy full SHA for bfaa68e
cmd/migrate_cmd.go
@@ -1,6 +1,7 @@
1
package cmd
2
3
import (
4
+ "fmt"
5
"net/url"
6
"os"
7
@@ -53,9 +54,16 @@ func migrate(cmd *cobra.Command, args []string) {
53
54
}
55
56
57
+ u, err := url.Parse(globalConfig.DB.URL)
58
+ processedUrl := globalConfig.DB.URL
59
+ if len(u.Query()) != 0 {
60
+ processedUrl = fmt.Sprintf("%s&application_name=gotrue_migrations", processedUrl)
61
+ } else {
62
+ processedUrl = fmt.Sprintf("%s?application_name=gotrue_migrations", processedUrl)
63
+ }
64
deets := &pop.ConnectionDetails{
65
Dialect: globalConfig.DB.Driver,
- URL: globalConfig.DB.URL,
66
+ URL: processedUrl,
67
68
deets.Options = map[string]string{
69
"migration_table_name": "schema_migrations",
0 commit comments