@bee.js/node 0.0.47 → 0.0.48
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/lib/DBA/beeDBA.js +3 -4
- package/package.json +1 -1
package/lib/DBA/beeDBA.js
CHANGED
|
@@ -98,13 +98,12 @@ module.exports.actions = {
|
|
|
98
98
|
|
|
99
99
|
MODEL_CREATE_CONSTRAINT: function (model, configsDB) {
|
|
100
100
|
let q = beeORM.quote;
|
|
101
|
-
let SQL = "\n\n\n
|
|
101
|
+
let SQL = "\n\n\n";
|
|
102
102
|
|
|
103
|
-
SQL += `/*----- Constraints for table ${q(model.table)} -----*/\n
|
|
104
|
-
SQL += `ALTER TABLE ${q(model.table)}\n`;
|
|
103
|
+
SQL += `/*----- Constraints for table ${q(model.table)} -----*/\n`;
|
|
105
104
|
|
|
106
105
|
for (let field in model.relations)
|
|
107
|
-
SQL +=
|
|
106
|
+
SQL += `\n\n ALTER TABLE ${q(model.table)}\n ADD CONSTRAINT ${q(
|
|
108
107
|
`FK_${model.relations[field].split(".")[0]}_X_${
|
|
109
108
|
model.table
|
|
110
109
|
}_${field}`.slice(0, 64)
|