@tstdl/base 0.92.58 → 0.92.61

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.
@@ -102,11 +102,12 @@ function getPostgresColumnEntries(type, tableName, dbSchema, path = new JsonPath
102
102
  return decodeText(decrypted);
103
103
  }
104
104
  : (value) => value;
105
+ const prefixedColumnName = [prefix, columnName].join('');
105
106
  return [
106
107
  {
107
- name: toCamelCase([prefix, columnName].join('')),
108
+ name: toCamelCase(prefixedColumnName),
108
109
  objectPath,
109
- type: getPostgresColumn(columnName, dbSchema, schema, columnReflectionData ?? {}, { type, property }),
110
+ type: getPostgresColumn(toSnakeCase(prefixedColumnName), dbSchema, schema, columnReflectionData ?? {}, { type, property }),
110
111
  reflectionData: columnReflectionData,
111
112
  dereferenceObjectPath: compileDereferencer(objectPath, { optional: true }),
112
113
  toDatabase,
@@ -208,7 +209,7 @@ export function getPgEnum(schema, enumeration, context) {
208
209
  }
209
210
  const values = (isArray(enumeration) ? enumeration : enumValues(enumeration))
210
211
  .map((value) => value.toString());
211
- const dbEnum = dbSchema.enum(enumName, values);
212
+ const dbEnum = dbSchema.enum(toSnakeCase(enumName), values);
212
213
  if (enums.has([dbSchema.schemaName, enumeration])) {
213
214
  enums.set([dbSchema.schemaName, enumeration], dbEnum);
214
215
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tstdl/base",
3
- "version": "0.92.58",
3
+ "version": "0.92.61",
4
4
  "author": "Patrick Hein",
5
5
  "publishConfig": {
6
6
  "access": "public"