Skip to content

Commit

Permalink
fix: remove redundant hacks: primaryKey filter for method dimensionCo…
Browse files Browse the repository at this point in the history
…lumns (#161)
  • Loading branch information
itrcz authored and paveltiunov committed Jul 16, 2019
1 parent 1ecdacd commit f910a56
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 0 additions & 7 deletions packages/cubejs-oracle-driver/driver/OracleDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ const reduceCb = (result, i) => {

if (i.key_type === "P" || i.key_type === "U") {
attributes.push(["primaryKey"]);
/**
* ScaffoldingSchema.js line 139
* seems like a bug
* TODO: remove this after method
* dimensionColumns change
*/
attributes.primaryKey = true;
}

tables.push({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class ScaffoldingSchema {
const dimensionColumns = tableDefinition.filter(
column =>
!column.name.startsWith('_') && this.columnType(column) === 'string' ||
column.attributes && column.attributes.primaryKey ||
column.attributes && column.attributes.indexOf('primaryKey') !== -1 ||
column.name.toLowerCase() === 'id'
);

Expand Down

0 comments on commit f910a56

Please sign in to comment.