Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
118 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,29 @@ | ||
CREATE TABLE m_lookup_table ( | ||
name_norm VARCHAR(255), | ||
name_orig VARCHAR(255), | ||
oid VARCHAR(36) NOT NULL, | ||
PRIMARY KEY (oid) | ||
); | ||
|
||
CREATE TABLE m_lookup_table_row ( | ||
row_key VARCHAR(255) NOT NULL, | ||
owner_oid VARCHAR(36) NOT NULL, | ||
label_norm VARCHAR(255), | ||
label_orig VARCHAR(255), | ||
lastChangeTimestamp TIMESTAMP, | ||
row_value VARCHAR(255), | ||
PRIMARY KEY (row_key, owner_oid) | ||
); | ||
|
||
ALTER TABLE m_lookup_table | ||
ADD CONSTRAINT uc_lookup_name UNIQUE (name_norm); | ||
|
||
ALTER TABLE m_lookup_table | ||
ADD CONSTRAINT fk_lookup_table | ||
FOREIGN KEY (oid) | ||
REFERENCES m_object; | ||
|
||
ALTER TABLE m_lookup_table_row | ||
ADD CONSTRAINT fk_lookup_table | ||
FOREIGN KEY (owner_oid) | ||
REFERENCES m_lookup_table; |
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
29 changes: 29 additions & 0 deletions
29
config/sql/midpoint/3.1/oracle/oracle-upgrade-3.1-3.1.1.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,29 @@ | ||
CREATE TABLE m_lookup_table ( | ||
name_norm VARCHAR2(255 CHAR), | ||
name_orig VARCHAR2(255 CHAR), | ||
oid VARCHAR2(36 CHAR) NOT NULL, | ||
PRIMARY KEY (oid) | ||
) INITRANS 30; | ||
|
||
CREATE TABLE m_lookup_table_row ( | ||
row_key VARCHAR2(255 CHAR) NOT NULL, | ||
owner_oid VARCHAR2(36 CHAR) NOT NULL, | ||
label_norm VARCHAR2(255 CHAR), | ||
label_orig VARCHAR2(255 CHAR), | ||
lastChangeTimestamp TIMESTAMP, | ||
row_value VARCHAR2(255 CHAR), | ||
PRIMARY KEY (row_key, owner_oid) | ||
) INITRANS 30; | ||
|
||
ALTER TABLE m_lookup_table | ||
ADD CONSTRAINT uc_lookup_name UNIQUE (name_norm) INITRANS 30; | ||
|
||
ALTER TABLE m_lookup_table | ||
ADD CONSTRAINT fk_lookup_table | ||
FOREIGN KEY (oid) | ||
REFERENCES m_object; | ||
|
||
ALTER TABLE m_lookup_table_row | ||
ADD CONSTRAINT fk_lookup_table | ||
FOREIGN KEY (owner_oid) | ||
REFERENCES m_lookup_table; |