Add SQLite migration (up only)

This commit is contained in:
Neil Alexander 2021-04-16 16:15:40 +01:00
parent 027a957f45
commit 30a93f5330
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
5 changed files with 166 additions and 1 deletions

View file

@ -40,6 +40,13 @@ type StateSnapshotNID int64
// These blocks of state data are combined to form the actual state.
type StateBlockNID int64
// EventNIDs is used to sort and dedupe event NIDs.
type EventNIDs []EventNID
func (a EventNIDs) Len() int { return len(a) }
func (a EventNIDs) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
func (a EventNIDs) Less(i, j int) bool { return a[i] < a[j] }
// StateBlockNIDs is used to sort and dedupe state block NIDs.
type StateBlockNIDs []StateBlockNID