Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MID-2714 service type repo support, upgrade scripts
- Loading branch information
Showing
10 changed files
with
257 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
CREATE TABLE m_service ( | ||
displayOrder INTEGER, | ||
locality_norm VARCHAR(255), | ||
locality_orig VARCHAR(255), | ||
name_norm VARCHAR(255), | ||
name_orig VARCHAR(255), | ||
oid VARCHAR(36) NOT NULL, | ||
PRIMARY KEY (oid) | ||
); | ||
|
||
CREATE TABLE m_service_type ( | ||
service_oid VARCHAR(36) NOT NULL, | ||
serviceType VARCHAR(255) | ||
); | ||
|
||
ALTER TABLE m_service | ||
ADD CONSTRAINT fk_service | ||
FOREIGN KEY (oid) | ||
REFERENCES m_abstract_role; | ||
|
||
ALTER TABLE m_service_type | ||
ADD CONSTRAINT fk_service_type | ||
FOREIGN KEY (service_oid) | ||
REFERENCES m_service; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
config/sql/midpoint/3.4/mysql/mysql-upgrade-3.4-SNAPSHOT-4.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
CREATE TABLE m_service ( | ||
displayOrder INTEGER, | ||
locality_norm VARCHAR(255), | ||
locality_orig VARCHAR(255), | ||
name_norm VARCHAR(255), | ||
name_orig VARCHAR(255), | ||
oid VARCHAR(36) NOT NULL, | ||
PRIMARY KEY (oid) | ||
) | ||
DEFAULT CHARACTER SET utf8 | ||
COLLATE utf8_bin | ||
ENGINE = InnoDB; | ||
|
||
CREATE TABLE m_service_type ( | ||
service_oid VARCHAR(36) NOT NULL, | ||
serviceType VARCHAR(255) | ||
) | ||
DEFAULT CHARACTER SET utf8 | ||
COLLATE utf8_bin | ||
ENGINE = InnoDB; | ||
|
||
ALTER TABLE m_service | ||
ADD CONSTRAINT fk_service | ||
FOREIGN KEY (oid) | ||
REFERENCES m_abstract_role (oid); | ||
|
||
ALTER TABLE m_service_type | ||
ADD CONSTRAINT fk_service_type | ||
FOREIGN KEY (service_oid) | ||
REFERENCES m_service (oid); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
config/sql/midpoint/3.4/oracle/oracle-upgrade-3.4-SNAPSHOT-4.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
CREATE TABLE m_service ( | ||
displayOrder NUMBER(10, 0), | ||
locality_norm VARCHAR2(255 CHAR), | ||
locality_orig VARCHAR2(255 CHAR), | ||
name_norm VARCHAR2(255 CHAR), | ||
name_orig VARCHAR2(255 CHAR), | ||
oid VARCHAR2(36 CHAR) NOT NULL, | ||
PRIMARY KEY (oid) | ||
) INITRANS 30; | ||
|
||
CREATE TABLE m_service_type ( | ||
service_oid VARCHAR2(36 CHAR) NOT NULL, | ||
serviceType VARCHAR2(255 CHAR) | ||
) INITRANS 30; | ||
|
||
ALTER TABLE m_service | ||
ADD CONSTRAINT fk_service | ||
FOREIGN KEY (oid) | ||
REFERENCES m_abstract_role; | ||
|
||
ALTER TABLE m_service_type | ||
ADD CONSTRAINT fk_service_type | ||
FOREIGN KEY (service_oid) | ||
REFERENCES m_service; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
config/sql/midpoint/3.4/postgresql/postgresql-upgrade-3.4-SNAPSHOT-4.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
CREATE TABLE m_service ( | ||
displayOrder INT4, | ||
locality_norm VARCHAR(255), | ||
locality_orig VARCHAR(255), | ||
name_norm VARCHAR(255), | ||
name_orig VARCHAR(255), | ||
oid VARCHAR(36) NOT NULL, | ||
PRIMARY KEY (oid) | ||
); | ||
|
||
CREATE TABLE m_service_type ( | ||
service_oid VARCHAR(36) NOT NULL, | ||
serviceType VARCHAR(255) | ||
); | ||
|
||
ALTER TABLE m_service | ||
ADD CONSTRAINT fk_service | ||
FOREIGN KEY (oid) | ||
REFERENCES m_abstract_role; | ||
|
||
ALTER TABLE m_service_type | ||
ADD CONSTRAINT fk_service_type | ||
FOREIGN KEY (service_oid) | ||
REFERENCES m_service; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
config/sql/midpoint/3.4/sqlserver/sqlserver-upgrade-3.4-SNAPSHOT-4.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
CREATE TABLE m_service ( | ||
displayOrder INT, | ||
locality_norm NVARCHAR(255) COLLATE database_default, | ||
locality_orig NVARCHAR(255) COLLATE database_default, | ||
name_norm NVARCHAR(255) COLLATE database_default, | ||
name_orig NVARCHAR(255) COLLATE database_default, | ||
oid NVARCHAR(36) COLLATE database_default NOT NULL, | ||
PRIMARY KEY (oid) | ||
); | ||
|
||
CREATE TABLE m_service_type ( | ||
service_oid NVARCHAR(36) COLLATE database_default NOT NULL, | ||
serviceType NVARCHAR(255) COLLATE database_default | ||
); | ||
|
||
ALTER TABLE m_service | ||
ADD CONSTRAINT fk_service | ||
FOREIGN KEY (oid) | ||
REFERENCES m_abstract_role; | ||
|
||
ALTER TABLE m_service_type | ||
ADD CONSTRAINT fk_service_type | ||
FOREIGN KEY (service_oid) | ||
REFERENCES m_service; |