@ccci/micro-server 1.0.236 → 1.0.237

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.
Files changed (2) hide show
  1. package/dist/index.js +10 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -299696,7 +299696,13 @@ class BaseModel extends Model {
299696
299696
  comment: tableOption,
299697
299697
  timestamps: defaultAttributes ? defaultAttributes : true
299698
299698
  };
299699
- enableDefaultFields = defaultAttributes ? defaultAttributes : true;
299699
+ if (defaultAttributes != null && !defaultAttributes) {
299700
+ enableDefaultFields = false;
299701
+ initOptions.paranoid = false;
299702
+ initOptions.timestamps = false;
299703
+ } else {
299704
+ enableDefaultFields = true;
299705
+ }
299700
299706
  } else {
299701
299707
  initOptions = {
299702
299708
  sequelize: DatabaseConnector.getConnection(),
@@ -299707,19 +299713,13 @@ class BaseModel extends Model {
299707
299713
  timestamps: true
299708
299714
  };
299709
299715
  if (tableOption.defaultAttributes != null && !tableOption.defaultAttributes) {
299710
- console.log("existing should be false :>> ", tableOption.defaultAttributes);
299711
- enableDefaultFields = tableOption.defaultAttributes;
299712
- console.log("enableDefaultFields :>> ", enableDefaultFields);
299716
+ enableDefaultFields = false;
299717
+ initOptions.paranoid = false;
299718
+ initOptions.timestamps = false;
299713
299719
  } else {
299714
299720
  enableDefaultFields = true;
299715
299721
  }
299716
299722
  }
299717
- if (initOptions.tableName === "Users") {
299718
- Logger.info("tableOption :>> ", tableOption);
299719
- Logger.info("initOptions.timestamps :>> ", initOptions.timestamps);
299720
- Logger.info("initOptions.paranoid :>> ", initOptions.paranoid);
299721
- Logger.info("enableDefaultFields :>> ", enableDefaultFields);
299722
- }
299723
299723
  this.init({
299724
299724
  ...fields,
299725
299725
  ...this.getCommonAttributes(enableDefaultFields)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccci/micro-server",
3
- "version": "1.0.236",
3
+ "version": "1.0.237",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",