Skip to content

Commit f910a56

Browse files
itrczpaveltiunov
authored andcommitted
fix: remove redundant hacks: primaryKey filter for method dimensionColumns (#161)
1 parent 1ecdacd commit f910a56

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

packages/cubejs-oracle-driver/driver/OracleDriver.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@ const reduceCb = (result, i) => {
1919

2020
if (i.key_type === "P" || i.key_type === "U") {
2121
attributes.push(["primaryKey"]);
22-
/**
23-
* ScaffoldingSchema.js line 139
24-
* seems like a bug
25-
* TODO: remove this after method
26-
* dimensionColumns change
27-
*/
28-
attributes.primaryKey = true;
2922
}
3023

3124
tables.push({

packages/cubejs-schema-compiler/scaffolding/ScaffoldingSchema.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class ScaffoldingSchema {
136136
const dimensionColumns = tableDefinition.filter(
137137
column =>
138138
!column.name.startsWith('_') && this.columnType(column) === 'string' ||
139-
column.attributes && column.attributes.primaryKey ||
139+
column.attributes && column.attributes.indexOf('primaryKey') !== -1 ||
140140
column.name.toLowerCase() === 'id'
141141
);
142142

0 commit comments

Comments
 (0)