Skip to content

Commit

Permalink
Merge pull request juju#17125 from SimonRichardson/db-local-repl
Browse files Browse the repository at this point in the history
juju#17125

When debugging or wanting to play with the db schema, it's handy to be able to apply the db to a given dqlite instance. The following does this for controllers and models.

For experimenting with the domain model this is really useful.

I've removed the infer schema, as I don't believe we need this anymore. It's not maintained and it served it purpose. If we do want it, we can use the older branches to get it.

<!-- Why this change is needed and what it does. -->

## Checklist

<!-- If an item is not applicable, use `~strikethrough~`. -->

- [x] Code style: imports ordered, good names, simple structure, etc
- [x] Comments saying why design decisions were made
- [x] Go unit tests, with comments saying what you're testing

## QA steps

```sh
$ go run ./scripts/dqlite/cmd/main.go --db=controller
$ go run ./scripts/dqlite/cmd/main.go --db=model
```

## Links

**Jira card:** JUJU-
  • Loading branch information
jujubot authored Apr 4, 2024
2 parents 494017d + db3f171 commit 4211156
Show file tree
Hide file tree
Showing 4 changed files with 311 additions and 309 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ require (
github.com/moby/sys/mountinfo v0.7.1
github.com/oracle/oci-go-sdk/v65 v65.55.0
github.com/packethost/packngo v0.28.1
github.com/peterh/liner v1.2.1
github.com/pkg/sftp v1.13.6
github.com/prometheus/client_golang v1.18.0
github.com/prometheus/client_model v0.5.0
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,7 @@ github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FI
github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4=
github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
github.com/peterh/liner v1.2.1 h1:O4BlKaq/LWu6VRWmol4ByWfzx6MfXc5Op5HETyIy5yg=
github.com/peterh/liner v1.2.1/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0=
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU=
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
Expand Down
309 changes: 0 additions & 309 deletions scripts/dqlite/cmd/infer_schema.go

This file was deleted.

Loading

0 comments on commit 4211156

Please sign in to comment.