@@ -49,8 +49,15 @@ func (database *Database) String(direction string) string {
49
49
50
50
// remote
51
51
remote = append (remote , fmt .Sprintf ("Schema:%s" , database .Schema ))
52
+ remote = append (remote , fmt .Sprintf ("Connection:%s" , database .Connection .GetType ()))
52
53
53
- if database .Hostname != "" {
54
+ if database .Connection .SshConnectionHostnameString () != "" {
55
+ remote = append (remote , fmt .Sprintf ("SSH:%s" , database .Connection .SshConnectionHostnameString ()))
56
+ }
57
+
58
+ if database .Connection .Docker != "" {
59
+ remote = append (remote , fmt .Sprintf ("Docker:%s" , database .Connection .Docker ))
60
+ } else if database .Hostname != "" {
54
61
hostname := database .Hostname
55
62
56
63
if database .Port != "" {
@@ -69,6 +76,22 @@ func (database *Database) String(direction string) string {
69
76
70
77
// local
71
78
local = append (local , fmt .Sprintf ("Schema:%s" , database .Local .Schema ))
79
+ local = append (local , fmt .Sprintf ("Connection:%s" , database .Local .Connection .GetType ()))
80
+
81
+ if database .Local .Connection .SshConnectionHostnameString () != "" {
82
+ local = append (local , fmt .Sprintf ("SSH:%s" , database .Local .Connection .SshConnectionHostnameString ()))
83
+ }
84
+
85
+ if database .Local .Connection .Docker != "" {
86
+ local = append (local , fmt .Sprintf ("Docker:%s" , database .Local .Connection .Docker ))
87
+ } else if database .Local .Hostname != "" {
88
+ hostname := database .Local .Hostname
89
+
90
+ if database .Local .Port != "" {
91
+ hostname += ":" + database .Local .Port
92
+ }
93
+ local = append (local , fmt .Sprintf ("Host:%s" , hostname ))
94
+ }
72
95
73
96
// build parts
74
97
switch direction {
0 commit comments