dbtasker 3.0.9 → 3.1.0

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.
package/README.md CHANGED
@@ -35,7 +35,7 @@ Property | Description
35
35
  | **dropcol** | `Boolean`: If true, allows dropping columns. |
36
36
  | **donttouch** | `Array`: List of database names protected from deletion. |
37
37
  | **forcedeletecolumn** | `Boolean`: If true, allow dropping column even if referanced by any other column. |
38
- | **forceupdatecolumn** | `Boolean`: If true, allow updating column even if referanced by any other column. `default: true` |
38
+ | **forceupdatecolumn** | `Boolean`: If true, allow updating column even if referanced by any other column. This one is very powerful. If you turn it on it will remove any foreign key that is referanced to the column is being updat and will remove all the column value that are simillar from the table if the column is set to `UNIQUE`. It is set `default: false` |
39
39
 
40
40
  ### Configuration Example
41
41
  `JavaScript`
package/altercolumn.js CHANGED
@@ -310,7 +310,7 @@ async function alterColumnQuery(dbConfig, columndata, columnName, tableName, dat
310
310
  }
311
311
  if (hasdupes === true) {
312
312
  if (forceupdatecolumn) {
313
- console.log(cstyler.bold.yellow("Cleaning duplicate rows before adding UNIQUE index..."));
313
+ console.log(cstyler.bold.underline.yellow("***Cleaning duplicate rows before adding UNIQUE index***"));
314
314
  const cleancol = await fncs.cleanDuplicateRows(dbConfig, database, tableName, columnName);
315
315
  if (cleancol === null) {
316
316
  console.error("Having server connection problem cleaning duplicate rows from database");
package/index.js CHANGED
@@ -138,7 +138,7 @@ module.exports = async function (allconfig, table_json) {
138
138
  } else if (falsers.includes(forceupdatecolumn)) {
139
139
  forceupdatecolumn = false;
140
140
  } else {
141
- forceupdatecolumn = true;
141
+ forceupdatecolumn = false;
142
142
  }
143
143
  console.log(cstyler.bold.underline.yellow("Lets check if the table need an upgrade"))
144
144
  // lets check all table name and column name
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dbtasker",
3
- "version": "3.0.9",
3
+ "version": "3.1.0",
4
4
  "funding": {
5
5
  "type": "patreon",
6
6
  "url": "https://www.patreon.com/kormoi/gift"
@@ -23,6 +23,9 @@
23
23
  "automation",
24
24
  "schema",
25
25
  "dbtask",
26
+ "dbt",
27
+ "dbta",
28
+ "dbtool",
26
29
  "database-automation",
27
30
  "schema-sync",
28
31
  "schema-builder",