pangea-server 1.0.56 → 1.0.58

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.
@@ -35,7 +35,7 @@ function Table(tableName, options = {}) {
35
35
  const allIndexes = [...tableIndexes, ...columnIndexes];
36
36
  seq.Table({
37
37
  tableName,
38
- modelName: (0, pangea_helpers_1.camelToSnake)(target.name),
38
+ // modelName: camelToSnake(target.name), // 'as' in SQL query
39
39
  charset: 'utf8mb4',
40
40
  collate: 'utf8mb4_general_ci',
41
41
  underscored: true,
@@ -28,17 +28,13 @@ async function seedTables(models, seeds) {
28
28
  (0, helpers_1.printInfo)('database', 'seeding tables...');
29
29
  const modelsToSeed = Object.values(models)
30
30
  .filter(() => (0, helpers_1.getEnvBool)('DB_INCLUDE_TESTING_SEEDS'))
31
- .map((model) => {
32
- console.log(model.name);
33
- return model.name;
34
- });
31
+ .map((model) => model.name);
35
32
  const modelsWithData = modelsToSeed.filter((modelName) => seeds[modelName]?.length);
36
33
  const tx = await (0, db_client_1.getDbClient)().transaction();
37
34
  const db = new db_class_1.Db(tx);
38
35
  try {
39
36
  await db.disableForeignKeyChecks();
40
37
  await Promise.all(modelsWithData.map((modelName) => db.insertMany(models[modelName], seeds[modelName])));
41
- console.log('hola');
42
38
  await db.enableForeignKeyChecks();
43
39
  await tx.commit();
44
40
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pangea-server",
3
3
  "description": "",
4
- "version": "1.0.56",
4
+ "version": "1.0.58",
5
5
  "files": [
6
6
  "dist"
7
7
  ],