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

@ -44,7 +44,8 @@ type RawSegment struct {
StreamID uuid.UUID
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
EncryptedKeyNonce []byte
@ -163,7 +164,7 @@ func (db *DB) testingGetAllSegments(ctx context.Context) (_ []RawSegment, err er
rows, err := db.db.Query(ctx, `
SELECT
stream_id, position,
created_at,
created_at, repaired_at,
root_piece_id, encrypted_key_nonce, encrypted_key,
encrypted_size,
plain_offset, plain_size,
@ -184,6 +185,7 @@ func (db *DB) testingGetAllSegments(ctx context.Context) (_ []RawSegment, err er
&seg.Position,
&seg.CreatedAt,
&seg.RepairedAt,
&seg.RootPieceID,
&seg.EncryptedKeyNonce,