Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DB changes for the recovery V2 API #4883

Merged
merged 6 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -796,10 +796,20 @@ CREATE TABLE IF NOT EXISTS IDN_RECOVERY_DATA (
STEP VARCHAR(127) NOT NULL,
TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
REMAINING_SETS VARCHAR(2500) DEFAULT NULL,
RECOVERY_FLOW_ID VARCHAR(255),
PRIMARY KEY(USER_NAME, USER_DOMAIN, TENANT_ID, SCENARIO,STEP),
UNIQUE(CODE)
);

CREATE TABLE IF NOT EXISTS IDN_RECOVERY_FLOW_DATA (
RECOVERY_FLOW_ID VARCHAR(255) NOT NULL,
CODE VARCHAR(255),
FAILED_ATTEMPTS INTEGER DEFAULT 0 NOT NULL,
RESEND_COUNT INTEGER DEFAULT 0 NOT NULL,
TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY(RECOVERY_FLOW_ID)
);

CREATE TABLE IF NOT EXISTS IDN_PASSWORD_HISTORY_DATA (
ID INTEGER NOT NULL AUTO_INCREMENT,
USER_NAME VARCHAR(255) NOT NULL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -777,10 +777,20 @@ CREATE TABLE IF NOT EXISTS IDN_RECOVERY_DATA (
STEP VARCHAR(127) NOT NULL,
TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
REMAINING_SETS VARCHAR(2500) DEFAULT NULL,
RECOVERY_FLOW_ID VARCHAR(255),
PRIMARY KEY(USER_NAME, USER_DOMAIN, TENANT_ID, SCENARIO,STEP),
UNIQUE(CODE)
);

CREATE TABLE IF NOT EXISTS IDN_RECOVERY_FLOW_DATA (
RECOVERY_FLOW_ID VARCHAR(255) NOT NULL,
CODE VARCHAR(255),
FAILED_ATTEMPTS INTEGER DEFAULT 0 NOT NULL,
RESEND_COUNT INTEGER DEFAULT 0 NOT NULL,
TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY(RECOVERY_FLOW_ID)
);

CREATE TABLE IF NOT EXISTS IDN_PASSWORD_HISTORY_DATA (
ID INTEGER NOT NULL AUTO_INCREMENT,
USER_NAME VARCHAR(255) NOT NULL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -788,10 +788,20 @@ CREATE TABLE IF NOT EXISTS IDN_RECOVERY_DATA (
STEP VARCHAR(127) NOT NULL,
TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
REMAINING_SETS VARCHAR(2500) DEFAULT NULL,
RECOVERY_FLOW_ID VARCHAR(255),
PRIMARY KEY(USER_NAME, USER_DOMAIN, TENANT_ID, SCENARIO,STEP),
UNIQUE(CODE)
);

CREATE TABLE IF NOT EXISTS IDN_RECOVERY_FLOW_DATA (
RECOVERY_FLOW_ID VARCHAR(255) NOT NULL,
CODE VARCHAR(255),
FAILED_ATTEMPTS INTEGER DEFAULT 0 NOT NULL,
RESEND_COUNT INTEGER DEFAULT 0 NOT NULL,
TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY(RECOVERY_FLOW_ID)
);

CREATE TABLE IF NOT EXISTS IDN_PASSWORD_HISTORY_DATA (
ID INTEGER NOT NULL AUTO_INCREMENT,
USER_NAME VARCHAR(255) NOT NULL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1148,10 +1148,20 @@ CREATE TABLE IDN_RECOVERY_DATA (
STEP VARCHAR(127) NOT NULL,
TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
REMAINING_SETS VARCHAR(2500),
RECOVERY_FLOW_ID VARCHAR(255),
PRIMARY KEY(USER_NAME, USER_DOMAIN, TENANT_ID, SCENARIO,STEP),
UNIQUE(CODE))
/

CREATE TABLE IDN_RECOVERY_FLOW_DATA (
RECOVERY_FLOW_ID VARCHAR(255) NOT NULL,
CODE VARCHAR(255),
FAILED_ATTEMPTS INTEGER DEFAULT 0 NOT NULL,
RESEND_COUNT INTEGER DEFAULT 0 NOT NULL,
TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY(RECOVERY_FLOW_ID))
/

CREATE TABLE IDN_PASSWORD_HISTORY_DATA (
ID INTEGER NOT NULL,
USER_NAME VARCHAR(255) NOT NULL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -797,10 +797,20 @@ CREATE TABLE IF NOT EXISTS IDN_RECOVERY_DATA (
STEP VARCHAR(127) NOT NULL,
TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
REMAINING_SETS VARCHAR(2500) DEFAULT NULL,
RECOVERY_FLOW_ID VARCHAR(255),
PRIMARY KEY(USER_NAME, USER_DOMAIN, TENANT_ID, SCENARIO,STEP),
UNIQUE(CODE)
);

CREATE TABLE IF NOT EXISTS IDN_RECOVERY_FLOW_DATA (
RECOVERY_FLOW_ID VARCHAR(255) NOT NULL,
CODE VARCHAR(255),
FAILED_ATTEMPTS INTEGER DEFAULT 0 NOT NULL,
RESEND_COUNT INTEGER DEFAULT 0 NOT NULL,
TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY(RECOVERY_FLOW_ID)
);

CREATE TABLE IF NOT EXISTS IDN_PASSWORD_HISTORY_DATA (
ID INTEGER NOT NULL AUTO_INCREMENT,
USER_NAME VARCHAR(255) NOT NULL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -890,10 +890,21 @@ CREATE TABLE IDN_RECOVERY_DATA (
STEP VARCHAR(127) NOT NULL,
TIME_CREATED DATETIME NOT NULL,
REMAINING_SETS VARCHAR(2500) DEFAULT NULL,
RECOVERY_FLOW_ID VARCHAR(255),
PRIMARY KEY(USER_NAME, USER_DOMAIN, TENANT_ID, SCENARIO,STEP),
UNIQUE(CODE)
);

IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_RECOVERY_FLOW_DATA]') AND TYPE IN (N'U'))
CREATE TABLE IDN_RECOVERY_FLOW_DATA (
RECOVERY_FLOW_ID VARCHAR(255) NOT NULL,
CODE VARCHAR(255),
FAILED_ATTEMPTS INTEGER DEFAULT 0 NOT NULL,
RESEND_COUNT INTEGER DEFAULT 0 NOT NULL,
TIME_CREATED DATETIME NOT NULL,
PRIMARY KEY(RECOVERY_FLOW_ID)
);

IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_PASSWORD_HISTORY_DATA]') AND TYPE IN (N'U'))
CREATE TABLE IDN_PASSWORD_HISTORY_DATA (
ID INTEGER NOT NULL IDENTITY ,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -940,11 +940,22 @@ CREATE TABLE IF NOT EXISTS IDN_RECOVERY_DATA (
STEP VARCHAR(127) NOT NULL,
TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
REMAINING_SETS VARCHAR(2500) DEFAULT NULL,
RECOVERY_FLOW_ID VARCHAR(255),
PRIMARY KEY (USER_NAME, USER_DOMAIN, TENANT_ID, SCENARIO, STEP),
UNIQUE (CODE)
)
ENGINE NDB;

CREATE TABLE IF NOT EXISTS IDN_RECOVERY_FLOW_DATA (
RECOVERY_FLOW_ID VARCHAR(255) NOT NULL,
CODE VARCHAR(255),
FAILED_ATTEMPTS INTEGER DEFAULT 0 NOT NULL,
RESEND_COUNT INTEGER DEFAULT 0 NOT NULL,
TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY(RECOVERY_FLOW_ID)
)
ENGINE NDB;

CREATE TABLE IF NOT EXISTS IDN_PASSWORD_HISTORY_DATA (
ID INTEGER NOT NULL AUTO_INCREMENT,
USER_NAME VARCHAR(255) NOT NULL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -825,10 +825,20 @@ CREATE TABLE IF NOT EXISTS IDN_RECOVERY_DATA (
STEP VARCHAR(127) NOT NULL,
TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
REMAINING_SETS VARCHAR(2500) DEFAULT NULL,
RECOVERY_FLOW_ID VARCHAR(255),
PRIMARY KEY(USER_NAME, USER_DOMAIN, TENANT_ID, SCENARIO,STEP),
UNIQUE(CODE)
)ENGINE INNODB;

CREATE TABLE IF NOT EXISTS IDN_RECOVERY_FLOW_DATA (
RECOVERY_FLOW_ID VARCHAR(255) NOT NULL,
CODE VARCHAR(255),
FAILED_ATTEMPTS INTEGER DEFAULT 0 NOT NULL,
RESEND_COUNT INTEGER DEFAULT 0 NOT NULL,
TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY(RECOVERY_FLOW_ID)
)ENGINE INNODB;

CREATE TABLE IF NOT EXISTS IDN_PASSWORD_HISTORY_DATA (
ID INTEGER NOT NULL AUTO_INCREMENT,
USER_NAME VARCHAR(255) NOT NULL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1187,10 +1187,22 @@ CREATE TABLE IDN_RECOVERY_DATA (
STEP VARCHAR2(127) NOT NULL,
TIME_CREATED TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
REMAINING_SETS VARCHAR2(2500) DEFAULT NULL,
RECOVERY_FLOW_ID VARCHAR2(255),
PRIMARY KEY(USER_NAME, USER_DOMAIN, TENANT_ID, SCENARIO,STEP),
UNIQUE(CODE)
)
/

CREATE TABLE IDN_RECOVERY_FLOW_DATA (
RECOVERY_FLOW_ID VARCHAR2(255) NOT NULL,
CODE VARCHAR2(255),
FAILED_ATTEMPTS INTEGER DEFAULT 0 NOT NULL,
RESEND_COUNT INTEGER DEFAULT 0 NOT NULL,
TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY(RECOVERY_FLOW_ID)
)
/

CREATE TABLE IDN_PASSWORD_HISTORY_DATA (
ID INTEGER,
USER_NAME VARCHAR2(255) NOT NULL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1183,10 +1183,22 @@ CREATE TABLE IDN_RECOVERY_DATA (
STEP VARCHAR2(127) NOT NULL,
TIME_CREATED TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
REMAINING_SETS VARCHAR2(2500) DEFAULT NULL,
RECOVERY_FLOW_ID VARCHAR2(255),
PRIMARY KEY(USER_NAME, USER_DOMAIN, TENANT_ID, SCENARIO,STEP),
UNIQUE(CODE)
)
/

CREATE TABLE IDN_RECOVERY_FLOW_DATA (
RECOVERY_FLOW_ID VARCHAR2(255) NOT NULL,
CODE VARCHAR2(255),
FAILED_ATTEMPTS INTEGER DEFAULT 0 NOT NULL,
RESEND_COUNT INTEGER DEFAULT 0 NOT NULL,
TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY(RECOVERY_FLOW_ID)
)
/

CREATE TABLE IDN_PASSWORD_HISTORY_DATA (
ID INTEGER,
USER_NAME VARCHAR2(255) NOT NULL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -954,10 +954,21 @@ CREATE TABLE IDN_RECOVERY_DATA (
STEP VARCHAR(127) NOT NULL,
TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
REMAINING_SETS VARCHAR(2500) DEFAULT NULL,
RECOVERY_FLOW_ID VARCHAR(255),
PRIMARY KEY(USER_NAME, USER_DOMAIN, TENANT_ID, SCENARIO,STEP),
UNIQUE(CODE)
);

DROP TABLE IF EXISTS IDN_RECOVERY_FLOW_DATA;
CREATE TABLE IDN_RECOVERY_FLOW_DATA (
RECOVERY_FLOW_ID VARCHAR(255) NOT NULL,
CODE VARCHAR(255),
FAILED_ATTEMPTS INTEGER DEFAULT 0 NOT NULL,
RESEND_COUNT INTEGER DEFAULT 0 NOT NULL,
TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY(RECOVERY_FLOW_ID)
);

DROP TABLE IF EXISTS IDN_PASSWORD_HISTORY_DATA;
CREATE SEQUENCE IDN_PASSWORD_HISTORY_DATA_PK_SEQ;
CREATE TABLE IDN_PASSWORD_HISTORY_DATA (
Expand Down
Loading