Skip to content

Commit

Permalink
[#246] Excluding index partitions from reverse engineering
Browse files Browse the repository at this point in the history
  • Loading branch information
shantstepanian committed Mar 1, 2020
1 parent e612aea commit d9a2971
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 6 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
# Change Log

## 8.0.1
## 8.1.0

### Functionality Improvements

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

Initial MemSQL support

### Technical Improvements

### Bug Fixes

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

#263: Correct and clarify the graph cycle error message

#264: NPE caused when package-info.txt file w/ METADATA section exists in staticdata (data) folder

Correcting error messages on graph cycles for complex databases

## 8.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,15 @@ LEFT JOIN DBA_TABLES tab ON obj.OBJECT_TYPE = 'TABLE' AND obj.OWNER = tab.OWNER
LEFT JOIN MY_CONSTRAINT_INDICES conind ON obj.OBJECT_TYPE = 'INDEX' AND obj.OWNER = conind.INDEX_OWNER AND obj.OBJECT_NAME = conind.INDEX_NAME
WHERE obj.OWNER = '${schema}'
AND obj.GENERATED = 'N' -- do not include generated objects
AND obj.OBJECT_TYPE NOT IN ('PACKAGE BODY', 'LOB', 'TABLE PARTITION', 'DATABASE LINK')
AND obj.OBJECT_TYPE NOT IN ('PACKAGE BODY', 'LOB', 'TABLE PARTITION', 'DATABASE LINK', 'INDEX PARTITION')
AND obj.OBJECT_NAME NOT LIKE 'MLOG${'$'}%' AND obj.OBJECT_NAME NOT LIKE 'RUPD${'$'}%' -- exclude the helper tables for materialized views
AND obj.OBJECT_NAME NOT LIKE 'SYS_%' -- exclude other system tables
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
AND (tab.NESTED is null OR tab.NESTED = 'NO')
${objectClause}
"""
// INDEX PARTITION exclusion was suggested by user - see Github issue #246
// Unable to test yet in our Docker instance - see comments in PARTITIONED_TAB.sql file in test
}

private fun queryComments(jdbc: JdbcHelper, conn: Connection, schema: String): MutableList<MutableMap<String, Any>> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ environments:
driverClass: oracle.jdbc.OracleDriver
cleanBuildAllowed: true
forceEnvInfraSetup: true
# We connect using the PDB service name, not the default container
# jdbcUrl: jdbc:oracle:thin:@localhost:1521/ORCLPDB1.localdomain # only for Docker setup, which isn't working yet
jdbcUrl: jdbc:oracle:thin:@localhost:1521/ORCLPDB1
jdbcUrl: jdbc:oracle:thin:@localhost:1521/ORCLPDB1.localdomain
defaultUserId: deploydba
defaultPassword: MyPassword
serverDirectories:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//// 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"
CREATE TABLE PARTITIONED_TAB (
A_ID INT NOT NULL,
B_ID INT NOT NULL
)
GO

//// CHANGE name=PARTITIONED_TAB_PART
CREATE INDEX PARTITIONED_TAB_PART
ON PARTITIONED_TAB(B_ID)
LOCAL PARALLEL NOLOGGING
GO
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//// 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"
CREATE TABLE PARTITIONED_TAB (
A_ID INT NOT NULL,
B_ID INT NOT NULL
)
GO

//// CHANGE name=PARTITIONED_TAB_PART
CREATE INDEX PARTITIONED_TAB_PART
ON PARTITIONED_TAB(B_ID)
LOCAL PARALLEL NOLOGGING
GO

0 comments on commit d9a2971

Please sign in to comment.