Add timestamp column to DB tables
I maintainer di solito rispondono entro 1 giorno
@dopey ci sta già lavorando.
Dal 3/3/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Hello!
- Vote on this issue by adding a 👍 reaction
- If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)
Issue details
The database is "only" used as a key-value storage, all tables only have nkey and nvalue columns, which make it very hard to filter for new rows, as nkey is a random number and not incrementing at least as far as I understood. We want to create reports from the database, where we want to filter for new certificates for the last day for example.
Why is this needed?
When adding a new column like added_at to all tables it would be much easier to filter for new entries.
Currently we added the columns ourselves like so (for MySQL/MariaDB):
ALTER TABLE acme_account_orders_index ADD COLUMN added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD INDEX idx_added_at (added_at);
ALTER TABLE acme_accounts ADD COLUMN added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD INDEX idx_added_at (added_at);
ALTER TABLE acme_authzs ADD COLUMN added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD INDEX idx_added_at (added_at);
ALTER TABLE acme_certs ADD COLUMN added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD INDEX idx_added_at (added_at);
ALTER TABLE acme_challenges ADD COLUMN added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD INDEX idx_added_at (added_at);
ALTER TABLE acme_external_account_keyID_provisionerID_index ADD COLUMN added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD INDEX idx_added_at (added_at);
ALTER TABLE acme_external_account_keyID_reference_index ADD COLUMN added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD INDEX idx_added_at (added_at);
ALTER TABLE acme_external_account_keys ADD COLUMN added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD INDEX idx_added_at (added_at);
ALTER TABLE acme_keyID_accountID_index ADD COLUMN added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD INDEX idx_added_at (added_at);
ALTER TABLE acme_orders ADD COLUMN added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD INDEX idx_added_at (added_at);
ALTER TABLE acme_serial_certs_index ADD COLUMN added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD INDEX idx_added_at (added_at);
ALTER TABLE nonces ADD COLUMN added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD INDEX idx_added_at (added_at);
ALTER TABLE revoked_ssh_certs ADD COLUMN added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD INDEX idx_added_at (added_at);
ALTER TABLE revoked_x509_certs ADD COLUMN added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD INDEX idx_added_at (added_at);
ALTER TABLE ssh_certs ADD COLUMN added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD INDEX idx_added_at (added_at);
ALTER TABLE ssh_host_principals ADD COLUMN added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD INDEX idx_added_at (added_at);
ALTER TABLE ssh_hosts ADD COLUMN added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD INDEX idx_added_at (added_at);
ALTER TABLE ssh_users ADD COLUMN added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD INDEX idx_added_at (added_at);
ALTER TABLE used_ott ADD COLUMN added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD INDEX idx_added_at (added_at);
ALTER TABLE wire_acme_dpop_token ADD COLUMN added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD INDEX idx_added_at (added_at);
ALTER TABLE wire_acme_oidc_token ADD COLUMN added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD INDEX idx_added_at (added_at);
ALTER TABLE x509_certs ADD COLUMN added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD INDEX idx_added_at (added_at);
ALTER TABLE x509_certs_data ADD COLUMN added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD INDEX idx_added_at (added_at);
ALTER TABLE x509_crl ADD COLUMN added_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD INDEX idx_added_at (added_at);
maybe it's an option to add such a column to the tables when creating them?
- Lingua principale
- Go
- Stelle
- 8.9k
- Fork
- 599
- Merge medio
- 21h 20m
- PR unite (30g)
- 15
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di smallstep/certificates
-
bug needs triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
smallstep/certificates#2863 ·
I maintainer di solito rispondono entro 1 giorno
-
needs triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
smallstep/certificates#2788 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
smallstep/certificates#2730 · 1 commento · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
smallstep/certificates#2860 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Tokens fail validation after the identity provider rotates its signing key until the JWKS cache expiresForse già presa @APWHY l’ha presa 100 giorni fa. Apertabug needs triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
smallstep/certificates#2831 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di smallstep/certificates
Issue simili
-
enhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno
-
Windows系统上,希望复制路径增加 Unix 格式Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
go good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Azure/prometheus-collector#1828 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni