dbtasker 3.1.0 → 3.1.1
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 +13 -7
- package/package.json +1 -1
- package/validation.js +1 -1
package/README.md
CHANGED
|
@@ -30,12 +30,12 @@ Property | Description
|
|
|
30
30
|
| **user** | Database Username |
|
|
31
31
|
| **password** | Database Password |
|
|
32
32
|
| **port** | Connection Port (Default: `3306`) |
|
|
33
|
-
| **
|
|
34
|
-
| **
|
|
35
|
-
| **
|
|
36
|
-
| **
|
|
37
|
-
| **
|
|
38
|
-
| **
|
|
33
|
+
| **drop database** | `Boolean`: If true, allows dropping databases. |
|
|
34
|
+
| **drop table** | `Boolean`: If true, allows dropping tables. |
|
|
35
|
+
| **drop column** | `Boolean`: If true, allows dropping columns. |
|
|
36
|
+
| **do not touch** | `Array`: List of database names protected from deletion. |
|
|
37
|
+
| **force delete column** | `Boolean`: If true, allow dropping column even if referanced by any other column. |
|
|
38
|
+
| **force update column** | `Boolean`: It is set `default: false` 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 updated then update the column then add the foreign key to those column again and if the column is set to `UNIQUE` it will remove all the column value that are simillar. |
|
|
39
39
|
|
|
40
40
|
### Configuration Example
|
|
41
41
|
`JavaScript`
|
|
@@ -118,6 +118,12 @@ ColumnTwo: {
|
|
|
118
118
|
|
|
119
119
|
| Feature | Supported Aliases |
|
|
120
120
|
| :--- | :--- |
|
|
121
|
+
| **Do not touch** | `donttouch, donottouch, donttouchdb, donottouchdb, donttouchdatabase, donottouchdatabase, dontdelete, donotdelete, dontdeletedb, donotdeletedb, dontdeletedatabase, donotdeletedatabase, dont_touch, do_not_touch, dont_touch_db, do_not_touch_db, dont_touch_database, do_not_touch_database, dont_delete, do_not_delete, dont_delete_db, do_not_delete_db, dont_delete_database, do_not_delete_database, reserveddb, reserved_db` |
|
|
122
|
+
| **Drop Database** | `dropdb, dropdatabase, deletedb, deletedatabase, drop_db, drop_database, delete_db, delete_database, removedb, removedatabase, remove_db, remove_database` |
|
|
123
|
+
| **Drop Table** | `droptable, deletetable, drop_table, delete_table, removetable, remove_table, dropdbtable, deletedbtable, removedbtable, dropdatabasetable, deletedatabasetable, removedatabasetable, drop_db_table, delete_db_table, remove_db_table, drop_database_table, delete_database_table, remove_database_table` |
|
|
124
|
+
| **Drop Column** | `dropcol, dropcolumn, deletecol, deletecolumn, removecol, removecolumn, drop_col, drop_column, delete_col, delete_column, remove_col, remove_column` |
|
|
125
|
+
| **Force Drop Column** | `forcedropcol, forcedropcolumn, forcedeletecol, forcedeletecolumn, forceremovecol, forceremovecolumn, force_drop_col, force_drop_column, force_delete_col, force_delete_column, force_remove_col, force_remove_column` |
|
|
126
|
+
| **Force Update Column** | `forceupdatecol, forcemodifycol, forceupdatecolumn, forcemodifycolumn, force_update_col, force_modify_col, force_update_column, force_modify_column, forcealtercol, forcealtercolumn, force_alter_col, force_alter_column` |
|
|
121
127
|
| **Type** | `type, columntype, column_type, datatype, data_type, typename, type_name` |
|
|
122
128
|
| **Length** | `length, size, scale, value, range, precision, maxlength, lengthvalue` |
|
|
123
129
|
| **Zerofill** | `zerofill, zero_fill, iszerofill, zerofillup, zero, fillzero, fill_zero, iszero` |
|
|
@@ -131,7 +137,7 @@ ColumnTwo: {
|
|
|
131
137
|
| `SpatialKey` | `spatial, spatialindex, isspatialkey, spatialkey, spatial_key, isspatial` |
|
|
132
138
|
| **Nullability** | `null, nulls, nullable, optional, isnulable, allownull, canbenull, notnull, not_null, nonnullable, notnullable, required, disallownull, non_nullable, not_nullable, disallow_null` |
|
|
133
139
|
| **Comments** | `comment, comments, columncomment, column_comment, description, label, helptext, hint, note` |
|
|
134
|
-
| **ForeignKey** | `fk, fuck, foreign_key, foreignkey` |
|
|
140
|
+
| **ForeignKey** | `fk, fuck, foreign, foreign_key, foreignkey` |
|
|
135
141
|
|
|
136
142
|
|
|
137
143
|
|
package/package.json
CHANGED
package/validation.js
CHANGED
|
@@ -910,7 +910,7 @@ async function JSONchecker(table_json, config, separator = "_") {
|
|
|
910
910
|
let fktable = undefined;
|
|
911
911
|
let fkcolumn = undefined;
|
|
912
912
|
let foreign_key = {};
|
|
913
|
-
const fk_variations = ["fk", "fuck", "foreign_key", "foreignkey"];
|
|
913
|
+
const fk_variations = ["fk", "fuck", "foreign", "foreign_key", "foreignkey"];
|
|
914
914
|
for (const item of Object.keys(deepColumn)) {
|
|
915
915
|
if (fk_variations.includes(item.toLowerCase())) {
|
|
916
916
|
foreign_key = deepColumn[item];
|