satellite/satellitedb: Use var block for single variable declar… (#2622)

* satellite/satellitedb: User var block for Error
  To follow with the code style of the majority of the sources of the
  current code base the Error variable should be in a block.
  Replacing a single var expression to a block one makes the godoc more
  consistent across the repository.

* satellite/satellitedb: Remove empty spaces end of line
This commit is contained in:
Ivan Fraixedes 2019-07-23 19:58:43 +02:00 committed by GitHub
parent aaf3283b4e
commit b24e60a33f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,8 +18,10 @@ import (
"storj.io/storj/satellite/satellitedb/pbold"
)
// ErrMigrate is for tracking migration errors
var ErrMigrate = errs.Class("migrate")
var (
// ErrMigrate is for tracking migration errors
ErrMigrate = errs.Class("migrate")
)
// CreateTables is a method for creating all tables for database
func (db *DB) CreateTables() error {
@ -878,7 +880,7 @@ func (db *DB) PostgresMigration() *migrate.Migration {
where a.interval_start = b.interval_start
and a.bucket_name = b.bucket_name
and a.action = b.action
and a.project_id = decode(replace(encode(b.project_id, 'escape'), '-', ''), 'hex')
and a.project_id = decode(replace(encode(b.project_id, 'escape'), '-', ''), 'hex')
and length(b.project_id) = 36
and length(a.project_id) = 16
;`,
@ -888,7 +890,7 @@ func (db *DB) PostgresMigration() *migrate.Migration {
where a.interval_start = b.interval_start
and a.bucket_name = b.bucket_name
and a.action = b.action
and a.project_id = decode(replace(encode(b.project_id, 'escape'), '-', ''), 'hex')
and a.project_id = decode(replace(encode(b.project_id, 'escape'), '-', ''), 'hex')
and length(b.project_id) = 36
and length(a.project_id) = 16
;`,