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

08a7e440958513a3e07c8535373e19345439a704
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;