@tstdl/base 0.92.70 → 0.92.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -136,7 +136,7 @@ function getPostgresColumn(columnName, dbSchema, propertySchema, reflectionData,
136
136
  break;
137
137
  }
138
138
  }
139
- let column = getPostgresBaseColumn(columnName, dbSchema, baseSchema, context);
139
+ let column = getPostgresBaseColumn(columnName, dbSchema, baseSchema, reflectionData, context);
140
140
  if (array) {
141
141
  column = column.array();
142
142
  }
@@ -154,11 +154,14 @@ function getPostgresColumn(columnName, dbSchema, propertySchema, reflectionData,
154
154
  }
155
155
  return column;
156
156
  }
157
- function getPostgresBaseColumn(columnName, dbSchema, schema, context) {
157
+ function getPostgresBaseColumn(columnName, dbSchema, schema, reflectionData, context) {
158
158
  if (schema instanceof DefaultSchema) {
159
- const column = getPostgresBaseColumn(columnName, dbSchema, schema.schema, context);
159
+ const column = getPostgresBaseColumn(columnName, dbSchema, schema.schema, reflectionData, context);
160
160
  return column.default(schema.defaultValue);
161
161
  }
162
+ if (reflectionData.encrypted) {
163
+ return bytea(columnName);
164
+ }
162
165
  if (schema instanceof UuidSchema) {
163
166
  let column = uuid(columnName);
164
167
  if (schema.defaultRandom) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tstdl/base",
3
- "version": "0.92.70",
3
+ "version": "0.92.71",
4
4
  "author": "Patrick Hein",
5
5
  "publishConfig": {
6
6
  "access": "public"