internal/store/migrations/0060_credential_origin.up.sql

fc755889baf27e51072434797bb4de2076d3f7eb
gitbay/internal/store/migrations/0060_credential_origin.up.sql

4 lines · 316 bytes

1-- The API token a credential was created through. NULL when it was not,
2-- and once that token is revoked.
3ALTER TABLE api_tokens ADD COLUMN created_by_token INTEGER REFERENCES api_tokens(id) ON DELETE SET NULL;
4ALTER TABLE ssh_keys ADD COLUMN created_by_token INTEGER REFERENCES api_tokens(id) ON DELETE SET NULL;