Skip to content

Commit d9a2971

Browse files
[#246] Excluding index partitions from reverse engineering
1 parent e612aea commit d9a2971

5 files changed

Lines changed: 34 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
# Change Log
22

3-
## 8.0.1
3+
## 8.1.0
44

55
### Functionality Improvements
66

77
#161: Hash mismatch error message should show the version name of the object
88

9+
Initial MemSQL support
10+
911
### Technical Improvements
1012

1113
### Bug Fixes
1214

13-
#263: Correct and clarify the graph cycle error message
15+
#246: For Oracle Reverse Engineering crashes when schema Reverse engineering an Oracle database crashes on index partitions
1416

17+
#263: Correct and clarify the graph cycle error message
1518

1619
#264: NPE caused when package-info.txt file w/ METADATA section exists in staticdata (data) folder
20+
1721
Correcting error messages on graph cycles for complex databases
1822

1923
## 8.0.0

obevo-db-impls/obevo-db-oracle/src/main/java/com/gs/obevo/db/impl/platforms/oracle/OracleReveng.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,15 @@ LEFT JOIN DBA_TABLES tab ON obj.OBJECT_TYPE = 'TABLE' AND obj.OWNER = tab.OWNER
185185
LEFT JOIN MY_CONSTRAINT_INDICES conind ON obj.OBJECT_TYPE = 'INDEX' AND obj.OWNER = conind.INDEX_OWNER AND obj.OBJECT_NAME = conind.INDEX_NAME
186186
WHERE obj.OWNER = '${schema}'
187187
AND obj.GENERATED = 'N' -- do not include generated objects
188-
AND obj.OBJECT_TYPE NOT IN ('PACKAGE BODY', 'LOB', 'TABLE PARTITION', 'DATABASE LINK')
188+
AND obj.OBJECT_TYPE NOT IN ('PACKAGE BODY', 'LOB', 'TABLE PARTITION', 'DATABASE LINK', 'INDEX PARTITION')
189189
AND obj.OBJECT_NAME NOT LIKE 'MLOG${'$'}%' AND obj.OBJECT_NAME NOT LIKE 'RUPD${'$'}%' -- exclude the helper tables for materialized views
190190
AND obj.OBJECT_NAME NOT LIKE 'SYS_%' -- exclude other system tables
191191
AND conind.INDEX_OWNER IS NULL -- exclude primary keys created as unique indexes, as the CREATE TABLE already includes it; SQL logic is purely in the join above
192192
AND (tab.NESTED is null OR tab.NESTED = 'NO')
193193
${objectClause}
194194
"""
195+
// INDEX PARTITION exclusion was suggested by user - see Github issue #246
196+
// Unable to test yet in our Docker instance - see comments in PARTITIONED_TAB.sql file in test
195197
}
196198

197199
private fun queryComments(jdbc: JdbcHelper, conn: Connection, schema: String): MutableList<MutableMap<String, Any>> {

obevo-db-impls/obevo-db-oracle/src/test/resources/local-oracle-creds.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ environments:
3535
driverClass: oracle.jdbc.OracleDriver
3636
cleanBuildAllowed: true
3737
forceEnvInfraSetup: true
38-
# We connect using the PDB service name, not the default container
39-
# jdbcUrl: jdbc:oracle:thin:@localhost:1521/ORCLPDB1.localdomain # only for Docker setup, which isn't working yet
40-
jdbcUrl: jdbc:oracle:thin:@localhost:1521/ORCLPDB1
38+
jdbcUrl: jdbc:oracle:thin:@localhost:1521/ORCLPDB1.localdomain
4139
defaultUserId: deploydba
4240
defaultPassword: MyPassword
4341
serverDirectories:
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//// CHANGE name=init includeEnvs="noEnvsYet" comment="Want to test INDEX PARTITION clause in reverse engineering, but Docker doesn't support partitioning - ORA-00439: feature not enabled: Partitioning"
2+
CREATE TABLE PARTITIONED_TAB (
3+
A_ID INT NOT NULL,
4+
B_ID INT NOT NULL
5+
)
6+
GO
7+
8+
//// CHANGE name=PARTITIONED_TAB_PART
9+
CREATE INDEX PARTITIONED_TAB_PART
10+
ON PARTITIONED_TAB(B_ID)
11+
LOCAL PARALLEL NOLOGGING
12+
GO
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//// CHANGE name=init includeEnvs="noEnvsYet" comment="Want to test INDEX PARTITION clause in reverse engineering, but Docker doesn't support partitioning - ORA-00439: feature not enabled: Partitioning"
2+
CREATE TABLE PARTITIONED_TAB (
3+
A_ID INT NOT NULL,
4+
B_ID INT NOT NULL
5+
)
6+
GO
7+
8+
//// CHANGE name=PARTITIONED_TAB_PART
9+
CREATE INDEX PARTITIONED_TAB_PART
10+
ON PARTITIONED_TAB(B_ID)
11+
LOCAL PARALLEL NOLOGGING
12+
GO

0 commit comments

Comments
 (0)