@dbml/core 2.5.0 → 2.5.2
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.
|
@@ -290,7 +290,8 @@ var MySQLExporter = /*#__PURE__*/function () {
|
|
|
290
290
|
|
|
291
291
|
if (comment.type === 'table') {
|
|
292
292
|
var table = model.tables[comment.tableId];
|
|
293
|
-
|
|
293
|
+
var schema = model.schemas[table.schemaId];
|
|
294
|
+
line += "ALTER TABLE ".concat((0, _utils.shouldPrintSchema)(schema, model) ? "`".concat(schema.name, "`.") : '', "`").concat(table.name, "` COMMENT = '").concat(table.note.replace(/'/g, "\\'"), "'");
|
|
294
295
|
}
|
|
295
296
|
|
|
296
297
|
line += ';\n';
|
|
@@ -185,7 +185,13 @@ var Schema = /*#__PURE__*/function (_Element) {
|
|
|
185
185
|
if (this.refs.some(function (r) {
|
|
186
186
|
return r.equals(ref);
|
|
187
187
|
})) {
|
|
188
|
-
|
|
188
|
+
var endpoint1 = ref.endpoints[0];
|
|
189
|
+
var fieldList1 = endpoint1.fieldNames.map(JSON.stringify).join(', ');
|
|
190
|
+
var endpoint2 = ref.endpoints[1];
|
|
191
|
+
var fieldList2 = endpoint2.fieldNames.map(JSON.stringify).join(', ');
|
|
192
|
+
var ref1 = "\"".concat(endpoint1.schemaName ? "".concat(endpoint1.schemaName, "\".\"") : '').concat(endpoint1.tableName, "\"(").concat(fieldList1, ")");
|
|
193
|
+
var ref2 = "\"".concat(endpoint2.schemaName ? "".concat(endpoint2.schemaName, "\".\"") : '').concat(endpoint2.tableName, "\"(").concat(fieldList2, ")");
|
|
194
|
+
ref.error("Reference with the same endpoints already exists: ".concat(ref1, " references ").concat(ref2));
|
|
189
195
|
}
|
|
190
196
|
}
|
|
191
197
|
}, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dbml/core",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.2",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "Holistics <dev@holistics.io>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"\\.(?!json$)[^.]*$": "jest-raw-loader"
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "42b0d7cb1c3deeeb0507ad5d779d9eb1ef94e6ff"
|
|
60
60
|
}
|