@@ -11,16 +11,17 @@ import (
1111// CertificateRecord encodes a certificate and its metadata
1212// that will be recorded in a database.
1313type CertificateRecord struct {
14- Serial string `db:"serial_number"`
15- AKI string `db:"authority_key_identifier"`
16- CALabel string `db:"ca_label"`
17- Status string `db:"status"`
18- Reason int `db:"reason"`
19- Expiry time.Time `db:"expiry"`
20- RevokedAt time.Time `db:"revoked_at"`
21- PEM string `db:"pem"`
22- IssuedAt time.Time `db:"issued_at"`
23- NotBefore time.Time `db:"not_before"`
14+ Serial string `db:"serial_number"`
15+ AKI string `db:"authority_key_identifier"`
16+ CALabel string `db:"ca_label"`
17+ Status string `db:"status"`
18+ Reason int `db:"reason"`
19+ Expiry time.Time `db:"expiry"`
20+ RevokedAt time.Time `db:"revoked_at"`
21+ PEM string `db:"pem"`
22+ // the following fields will be empty for data inserted before migrate 002 has been run.
23+ IssuedAt * time.Time `db:"issued_at"`
24+ NotBefore * time.Time `db:"not_before"`
2425 MetadataJSON types.JSONText `db:"metadata"`
2526 SANsJSON types.JSONText `db:"sans"`
2627 CommonName sql.NullString `db:"common_name"`
0 commit comments