Skip to content

Commit

Permalink
feat: replace database params with URI (#84)
Browse files Browse the repository at this point in the history
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰
v    Before smashing the submit button please review the checkboxes.
v If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

This PR updates most of the database configuration params with a simpler
URI

- [x] Targeted PR against correct branch.
- [ ] Linked to Github issue with discussion and accepted design OR link
to spec that describes this work.
- [ ] Wrote unit tests.
- [ ] Re-reviewed `Files changed` in the Github PR explorer.

Co-authored-by: Magic Cat <37407870+MonikaCat@users.noreply.github.com>
  • Loading branch information
RiccardoM and MonikaCat committed Jan 19, 2024
1 parent a6bde6d commit 9814b21
Show file tree
Hide file tree
Showing 16 changed files with 153 additions and 476 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- ([\#77](https://github.com/forbole/juno/pull/77)) Add wait group to handle messages concurrently
- ([\#79](https://github.com/forbole/juno/pull/79)) Use `sqlx` instead of `sql` while dealing with a PostgreSQL database
- ([\#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

0 comments on commit 9814b21

Please sign in to comment.