zitadel/migrations/cockroach/V1.35__features.sql
Livio Amstutz a4763b1e4c
feat: features (#1427)
* features

* features

* features

* fix json tags

* add features handler to auth

* mocks for tests

* add setup step

* fixes

* add featurelist to auth api

* grandfather state and typos

* typo

* merge new-eventstore

* fix login policy tests

* label policy in features

* audit log retention
2021-03-25 17:26:21 +01:00

103 lines
3.0 KiB
SQL

CREATE TABLE adminapi.features
(
aggregate_id TEXT,
creation_date TIMESTAMPTZ,
change_date TIMESTAMPTZ,
sequence BIGINT,
default_features BOOLEAN,
tier_name TEXT,
tier_description TEXT,
state SMALLINT,
state_description TEXT,
audit_log_retention BIGINT,
login_policy_factors BOOLEAN,
login_policy_idp BOOLEAN,
login_policy_passwordless BOOLEAN,
login_policy_registration BOOLEAN,
login_policy_username_login BOOLEAN,
password_complexity_policy BOOLEAN,
label_policy BOOLEAN,
PRIMARY KEY (aggregate_id)
);
CREATE TABLE auth.features
(
aggregate_id TEXT,
creation_date TIMESTAMPTZ,
change_date TIMESTAMPTZ,
sequence BIGINT,
default_features BOOLEAN,
tier_name TEXT,
tier_description TEXT,
state SMALLINT,
state_description TEXT,
audit_log_retention BIGINT,
login_policy_factors BOOLEAN,
login_policy_idp BOOLEAN,
login_policy_passwordless BOOLEAN,
login_policy_registration BOOLEAN,
login_policy_username_login BOOLEAN,
password_complexity_policy BOOLEAN,
label_policy BOOLEAN,
PRIMARY KEY (aggregate_id)
);
CREATE TABLE authz.features
(
aggregate_id TEXT,
creation_date TIMESTAMPTZ,
change_date TIMESTAMPTZ,
sequence BIGINT,
default_features BOOLEAN,
tier_name TEXT,
tier_description TEXT,
state SMALLINT,
state_description TEXT,
audit_log_retention BIGINT,
login_policy_factors BOOLEAN,
login_policy_idp BOOLEAN,
login_policy_passwordless BOOLEAN,
login_policy_registration BOOLEAN,
login_policy_username_login BOOLEAN,
password_complexity_policy BOOLEAN,
label_policy BOOLEAN,
PRIMARY KEY (aggregate_id)
);
CREATE TABLE management.features
(
aggregate_id TEXT,
creation_date TIMESTAMPTZ,
change_date TIMESTAMPTZ,
sequence BIGINT,
default_features BOOLEAN,
tier_name TEXT,
tier_description TEXT,
state SMALLINT,
state_description TEXT,
audit_log_retention BIGINT,
login_policy_factors BOOLEAN,
login_policy_idp BOOLEAN,
login_policy_passwordless BOOLEAN,
login_policy_registration BOOLEAN,
login_policy_username_login BOOLEAN,
password_complexity_policy BOOLEAN,
label_policy BOOLEAN,
PRIMARY KEY (aggregate_id)
);