Files
zitadel/migrations/cockroach/V1.110__personal_access_token.sql
T
699fdaf68e feat: add personal access tokens for service users (#2974)
* feat: add machine tokens

* fix test

* rename to pat

* fix merge and tests

* fix scopes

* fix migration version

* fix test

* Update internal/repository/user/personal_access_token.go

Co-authored-by: Fabi <[email protected]>

Co-authored-by: Fabi <[email protected]>
2022-02-08 09:37:28 +01:00

15 lines
410 B
SQL

ALTER TABLE auth.tokens ADD COLUMN is_pat BOOLEAN DEFAULT false NOT NULL;
CREATE TABLE zitadel.projections.personal_access_tokens (
id STRING
, creation_date TIMESTAMPTZ NOT NULL
, change_date TIMESTAMPTZ NOT NULL
, resource_owner STRING NOT NULL
, sequence INT8 NOT NULL
, user_id STRING NOT NULL
, expiration TIMESTAMPTZ NOT NULL
, scopes STRING[]
, PRIMARY KEY (id)
);