This fixes an occurrence of a loop variable being captured in a
parallel test. With the previous code, only the last test case is
actually exercised. To work around this problem, we create a local
copy of the range variable before the parallel test, as suggested in
the Go documentation for the `testing` package:
https://pkg.go.dev/testing#hdr-Subtests_and_Sub_benchmarks
Issue was found automatically using the `loopvarcapture` linter.
* feat: add the ability to replicate based on bucket name rather than bucket id.
- This adds compatibility with 1.x replication targets
* fix: improve error checking and add tests
* fix: add additional constraint to replications table
* fix: use OR not AND for constraint
* feat: delete invalid replications on downgrade
* fix: should be less than 2.4
* test: add test around down migration and cleanup migration code
* fix: use nil instead of platform.ID(1) for better consistency
* fix: fix tests
* fix: fix tests
Maintaining the current queue size in a SQL column would require
updating the DB on every queue operation. Avoid that contention by
instead looking up the current size on the in-memory durable queue
struct, which is already tracked & updated as data enters & leaves
the queue.
* feat: sql down migrations
* refactor: different name for up migrations
* chore: update migrations ref in svc tests
* build: add lint step to verify sql migration names match
* feat: migration for operator token to include permissions for annotations and notebooks
* feat: run migrations for restored dbs
* chore: cleanup go.mod
* chore: better description comment for migration
* fix: fixed cursor return condition
* fix: hard code the list of old operator permissions
* feat: run migrations prior to swapping restored dbs
* fix: fix the sqlite migrator
* chore: update CHANGELOG
* feat(annotations): storage service
* feat: stickers are in db as array
* chore: fix some unintended diffs
* fix: fixes from review
* fix: specific table name for json_each
* fix: update primary keys and constraints
* fix: fix schema
* feat: stream name updates are reflected in annotations via FK
* feat: new metadata backup endpoint
* feat: added restore/sql API endpoint
* fix: content-type is multipart/mixed, part names are kv and sql
* fix: changed multipart manifest to buckets and made it .json
* feat: added lock for backing up sqlite and bolt dbs
* fix: use read lock instead of write lock on kv during backup
* fix: use filepath.Join for temp dirs