wso2 / product-is

Welcome to the WSO2 Identity Server source code! For info on working with the WSO2 Identity Server repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
748 stars 728 forks source link

[ISSUE] Errors when source the H2 identity script against a remote H2 server with 5.9.0 wum #8010

Closed ShanikaWickramasinghe closed 1 week ago

ShanikaWickramasinghe commented 4 years ago

Environment IS pack wso2is-5.9.0+1585323544240.full

Steps to Reproduce

  1. Create a H2 remote database
  2. Execute the below H2 scripts against a remote H2 server

/wso2is-5.9.0/dbscripts/identity/h2.sql

Observation Observing the below errors

Error occurred during SQL script execution

Reason:
SQL Error [42001] [42001]: Syntax error in SQL statement "CREATE TABLE IF NOT EXISTS IDN_PASSWORD_HISTORY_DATA (
  ID INTEGER NOT NULL AUTO_INCREMENT,
  USER_NAME   VARCHAR(255) NOT NULL,
  USER_DOMAIN VARCHAR(127) NOT NULL,
  TENANT_ID   INTEGER DEFAULT -1,
  SALT_VALUE  VARCHAR(255),
  HASH        VARCHAR(255) NOT NULL,
  TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (ID),
  UNIQUE (USER_NAME,USER_DOMAIN,TENANT_ID,SALT_VALUE,HASH),
)[*]"; expected "identifier"; SQL statement:
CREATE TABLE IF NOT EXISTS IDN_PASSWORD_HISTORY_DATA (
  ID INTEGER NOT NULL AUTO_INCREMENT,
  USER_NAME   VARCHAR(255) NOT NULL,
  USER_DOMAIN VARCHAR(127) NOT NULL,
  TENANT_ID   INTEGER DEFAULT -1,
  SALT_VALUE  VARCHAR(255),
...

Error occurred during SQL script execution

Reason:
SQL Error [42001] [42001]: Syntax error in SQL statement "CREATE TABLE IF NOT EXISTS IDN_CLAIM_MAPPING (
  ID INTEGER NOT NULL AUTO_INCREMENT,
  EXT_CLAIM_ID INTEGER NOT NULL,
  MAPPED_LOCAL_CLAIM_ID INTEGER NOT NULL,
  TENANT_ID INTEGER NOT NULL,
  PRIMARY KEY (ID),
  FOREIGN KEY (EXT_CLAIM_ID) REFERENCES IDN_CLAIM(ID) ON DELETE CASCADE,
  FOREIGN KEY (MAPPED_LOCAL_CLAIM_ID) REFERENCES IDN_CLAIM(ID) ON DELETE CASCADE,
  CONSTRAINT EXT_TO_LOC_MAPPING_CONSTRN UNIQUE (EXT_CLAIM_ID, TENANT_ID),
)[*]"; expected "identifier"; SQL statement:
CREATE TABLE IF NOT EXISTS IDN_CLAIM_MAPPING (
  ID INTEGER NOT NULL AUTO_INCREMENT,
  EXT_CLAIM_ID INTEGER NOT NULL,
  MAPPED_LOCAL_CLAIM_ID INTEGER NOT NULL,
  TENANT_ID INTEGER NOT NULL,
  PRIMARY KEY (ID),
  FOREIGN KEY (EXT_CLAIM_ID) REFERENCES IDN_CLAIM(ID) ON DELETE CASCADE,
...
isharak commented 1 week ago

This issue is being closed due to extended inactivity. Please feel free to reopen it if further attention is needed. Thank you for helping us keep the issue list relevant and focused!