Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: replace database params with URI #84

Merged
merged 8 commits into from
Nov 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- ([\#76](https://github.com/forbole/juno/pull/76)) Return 0 as height for `GetLastBlockHeight()` method if there are no blocks saved in database
- ([\#79](https://github.com/forbole/juno/pull/79)) Use `sqlx` instead of `sql` while dealing with a PostgreSQL database
RiccardoM marked this conversation as resolved.
Show resolved Hide resolved
- ([\#83](https://github.com/forbole/juno/pull/83)) Bump `github.com/tendermint/tendermint` to `v0.34.22`
- ([\#84](https://github.com/forbole/juno/pull/84)) Replace database configuration params with URI

## v3.4.0
### Changes
Expand Down
9 changes: 3 additions & 6 deletions cmd/migrate/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@ import (

"github.com/spf13/cobra"

v2 "github.com/forbole/juno/v3/cmd/migrate/v2"
v3 "github.com/forbole/juno/v3/cmd/migrate/v3"
v4 "github.com/forbole/juno/v3/cmd/migrate/v4"
)

type Migrator func(parseCfg *parsecmdtypes.Config) error

var (
migrations = map[string]Migrator{
"v2": v2.RunMigration,
"v3": v3.RunMigration,
"v4": v4.RunMigration,
}
)

Expand All @@ -35,8 +33,7 @@ func NewMigrateCmd(appName string, parseConfig *parsecmdtypes.Config) *cobra.Com
Use: "migrate [to-version]",
Short: "Perform the migrations from the current version to the specified one",
Long: `Migrates all the necessary things (config file, database, etc) from the current version to the new one.
If you are upgrading from a very old version to the latest one, migrations must be performed in order
(eg. to migrate from v1 to v3 you need to do v1 -> v2 and then v2 -> v3).
Note that migrations must be performed in order: to migrate from vX to vX+2 you need to do vX -> vX+1 and then vX+1 -> vX+2.
`,
Example: fmt.Sprintf("%s migrate v3", appName),
Args: cobra.RangeArgs(0, 1),
Expand Down
66 changes: 0 additions & 66 deletions cmd/migrate/v1/types.go

This file was deleted.

31 changes: 0 additions & 31 deletions cmd/migrate/v1/utils.go

This file was deleted.

130 changes: 0 additions & 130 deletions cmd/migrate/v2/migrate.go

This file was deleted.

59 changes: 0 additions & 59 deletions cmd/migrate/v2/types.go

This file was deleted.

Loading