Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into event-sub
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashi1993 committed Oct 12, 2023
2 parents 19d7949 + 72fa47c commit 916abae
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@
*/

--For account metadata feature run the following queries against the openbank_openbankingdb--
CREATE TABLE IF NOT EXISTS OB_ACCOUNT_METADATA (
ACCOUNT_ID VARCHAR(100) NOT NULL,
USER_ID VARCHAR(100) NOT NULL,
METADATA_KEY VARCHAR(100) NOT NULL,
METADATA_VALUE VARCHAR(100) NOT NULL,
LAST_UPDATE_TIMESTAMP DATETIME NOT NULL DEFAULT getdate(),
PRIMARY KEY (USER_ID,ACCOUNT_ID,METADATA_KEY)
);
IF OBJECT_ID('dbo.OB_ACCOUNT_METADATA', 'U') IS NULL
BEGIN
CREATE TABLE dbo.OB_ACCOUNT_METADATA
(
ACCOUNT_ID varchar(100) NOT NULL,
USER_ID varchar(100) NOT NULL,
METADATA_KEY varchar(100) NOT NULL,
METADATA_VALUE varchar(100) NOT NULL,
LAST_UPDATED_TIMESTAMP timestamp NOT NULL,
CONSTRAINT OB_ACCOUNT_USER_ATTRIBUTE_PK PRIMARY KEY (USER_ID,ACCOUNT_ID,METADATA_KEY)
)
END;
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ CREATE TABLE IF NOT EXISTS OB_ACCOUNT_METADATA (
USER_ID varchar(100) NOT NULL,
METADATA_KEY varchar(100) NOT NULL,
METADATA_VALUE varchar(100) NOT NULL,
LAST_UPDATE_TIMESTAMP timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL,
LAST_UPDATED_TIMESTAMP timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (USER_ID,ACCOUNT_ID,METADATA_KEY)
);
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ CREATE TABLE IF NOT EXISTS OB_ACCOUNT_METADATA (
USER_ID varchar(100) NOT NULL,
METADATA_KEY varchar(100) NOT NULL,
METADATA_VALUE varchar(100) NOT NULL,
LAST_UPDATE_TIMESTAMP TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
LAST_UPDATED_TIMESTAMP TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (USER_ID,ACCOUNT_ID,METADATA_KEY)
);

0 comments on commit 916abae

Please sign in to comment.