Skip to content

Commit

Permalink
Added ApplicationInfo.Summary() method in interface and realisation. …
Browse files Browse the repository at this point in the history
…Some fixes in GetMigrationDSN() method.
  • Loading branch information
smgladkovskiy committed Nov 3, 2021
1 parent 7b19788 commit bf68b8e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions application_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ func (i ApplicationInfo) GetAlias() string {
func (i ApplicationInfo) GetVersion() string {
return i.Version
}

func (i ApplicationInfo) Summary() string {
return fmt.Sprintf("%s (%s) %s", i.Name, i.Version, i.Copyright)
}
2 changes: 1 addition & 1 deletion database.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (d *Database) GetDSN() string {
}

func (d *Database) GetMigrationDSN() string {
return fmt.Sprintf("%s&x-migrations-table=migrations", d.GetDSN())
return fmt.Sprintf("%s&x-migrations-table=%s", d.GetDSN(), d.Migrations.TableName)
}

func (d *Database) GetMigrationsPath() string {
Expand Down
1 change: 1 addition & 0 deletions interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type ApplicationInfoCfgInterface interface {
GetString() string
GetAlias() string
GetVersion() string
Summary() string
}

type DatabaseCfgInterface interface {
Expand Down

0 comments on commit bf68b8e

Please sign in to comment.