satellite/metainfo/metabase: add RepairedAt to RawSegment

Change-Id: I3f8bbed0f815f8394fc6ab16a914cae276fbab56
This commit is contained in:
Michał Niewrzał 2021-03-17 10:52:26 +01:00 committed by Michal Niewrzal
parent be8a70309d
commit 1c02158620

View File

@ -45,6 +45,7 @@ type RawSegment struct {
Position SegmentPosition Position SegmentPosition
CreatedAt *time.Time // TODO: make it non-nilable after we migrate all existing segments to have creation time CreatedAt *time.Time // TODO: make it non-nilable after we migrate all existing segments to have creation time
RepairedAt *time.Time
RootPieceID storj.PieceID RootPieceID storj.PieceID
EncryptedKeyNonce []byte EncryptedKeyNonce []byte
@ -163,7 +164,7 @@ func (db *DB) testingGetAllSegments(ctx context.Context) (_ []RawSegment, err er
rows, err := db.db.Query(ctx, ` rows, err := db.db.Query(ctx, `
SELECT SELECT
stream_id, position, stream_id, position,
created_at, created_at, repaired_at,
root_piece_id, encrypted_key_nonce, encrypted_key, root_piece_id, encrypted_key_nonce, encrypted_key,
encrypted_size, encrypted_size,
plain_offset, plain_size, plain_offset, plain_size,
@ -184,6 +185,7 @@ func (db *DB) testingGetAllSegments(ctx context.Context) (_ []RawSegment, err er
&seg.Position, &seg.Position,
&seg.CreatedAt, &seg.CreatedAt,
&seg.RepairedAt,
&seg.RootPieceID, &seg.RootPieceID,
&seg.EncryptedKeyNonce, &seg.EncryptedKeyNonce,