Commit Graph

8 Commits

Author SHA1 Message Date
Isaac Hess
580e511b4c
storagenode/storagenodedb: Migrate to separate dbs (#3081)
* storagenode/storagenodedb: Migrate to separate dbs

* storagenode/storagenodedb: Add migration to drop versions tables

* Put drop table statements into a transaction.

* Fix CI errors.

* Fix CI errors.

* Changes requested from PR feedback.

* storagenode/storagenodedb: fix tx commit
2019-09-23 12:36:46 -07:00
Isaac Hess
8b358ef365
internal/dbutil/sqliteutil: Fix error handling, ensure connections are closed (#3078)
* internal/dbutil/sqliteutil: Fix error handling, ensure connections are closed

* internal/dbutil/sqliteutil: Separate function to handle conn

* internal/dbutil/sqliteutil: Fix names
2019-09-19 15:21:03 -06:00
Isaac Hess
fd20fa38c6
internal/dbutil/sqliteutil: add MigrateTablesToDatabase (#3064)
* internal/dbutil/sqliteutil: add migrator

* internal/dbutil/sqliteutil: Fix errors and tablename
2019-09-17 15:42:40 -06:00
Jeff Wendling
a2418b22af storagenodedb: optimize index usage and queries (#2545)
- Drops some unused indexes
- Applies a computed index to timestamp columns
- Applies a partial index for expired pieces
- Uses BETWEEN to avoid some datetime calls
- Filters expired piece search by those that aren't NULL
2019-07-12 15:29:09 -04:00
Kaloyan Raev
ae36979804 Take advantage of Is and IsFunc from zeebo/errs (#2310) 2019-06-26 09:38:07 +02:00
Egon Elbre
f7ed63a119
handle database error checks properly (#1796) 2019-04-23 14:13:57 +03:00
Michal Niewrzal
6d86610bcc
Fix UseSerialNumber panic (#1663)
This change fixes UseSerialNumber and case when given serial number doesn't exists in DB.
2019-04-04 16:42:01 +02:00
Michal Niewrzal
84c2f991d2
Create dbutil package for sqlite (#1311) 2019-02-15 17:13:00 +01:00