-
Notifications
You must be signed in to change notification settings - Fork 102
[sql-41] firewalldb: add migration code for kvstores from kvdb to SQL #1079
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: master
Are you sure you want to change the base?
Changes from all commits
3c42778
a7ecf0a
0b70477
dd4acca
8a3ae24
f9d48df
f9f6e1b
584c908
10550d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
//go:build test_db_postgres || test_db_sqlite | ||
|
||
package accounts | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/lightninglabs/lightning-terminal/db" | ||
"github.com/lightningnetwork/lnd/clock" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
// createStore is a helper function that creates a new SQLStore and ensure that | ||
// it is closed when during the test cleanup. | ||
func createStore(t *testing.T, sqlDB *db.BaseDB, clock clock.Clock) *SQLStore { | ||
store := NewSQLStore(sqlDB, clock) | ||
t.Cleanup(func() { | ||
require.NoError(t, store.Close()) | ||
}) | ||
|
||
return store | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,13 +16,13 @@ the temporary store changes instead of just keeping an in-memory store is that | |
we can then guarantee atomicity if changes are made to both the permanent and | ||
temporary stores. | ||
|
||
rules -> perm -> rule-name -> global -> {k:v} | ||
-> sessions -> group ID -> session-kv-store -> {k:v} | ||
-> feature-kv-stores -> feature-name -> {k:v} | ||
"rules" -> "perm" -> rule-name -> "global" -> {k:v} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks for the update here 👍 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah thanks for the fix!! 🙏 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. while we are here, can we add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and |
||
"session-kv-store" -> group ID -> {k:v} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing the |
||
-> "feature-kv-stores" -> feature-name -> {k:v} | ||
|
||
-> temp -> rule-name -> global -> {k:v} | ||
-> sessions -> group ID -> session-kv-store -> {k:v} | ||
-> feature-kv-stores -> feature-name -> {k:v} | ||
-> "temp" -> rule-name -> "global" -> {k:v} | ||
"session-kv-store" -> group ID -> {k:v} | ||
-> "feature-kv-stores" -> feature-name -> {k:v} | ||
*/ | ||
|
||
var ( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your commit messages could be fleshed out a bit more pls. it isnt clear why this needs to be exported (same for other commits in this PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, completely forgot updating the commit messages in the latest push. I've updated them in the latest push though, so I hope the commits should be understandable now!