@dbml/core 3.7.4 → 3.8.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.
|
@@ -48,8 +48,8 @@ var createFields = function createFields(rawFields, fieldsConstraints) {
|
|
|
48
48
|
dbdefault: field.dbdefault,
|
|
49
49
|
not_null: field.not_null,
|
|
50
50
|
increment: field.increment,
|
|
51
|
-
pk: constraints.pk,
|
|
52
|
-
unique: constraints.unique,
|
|
51
|
+
pk: constraints.pk || field.pk,
|
|
52
|
+
unique: constraints.unique || field.unique,
|
|
53
53
|
note: field.note
|
|
54
54
|
});
|
|
55
55
|
return f;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dbml/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.1",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "Holistics <dev@holistics.io>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"prepublish": "npm run build"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@dbml/parse": "^3.
|
|
35
|
+
"@dbml/parse": "^3.8.1",
|
|
36
36
|
"antlr4": "^4.13.1",
|
|
37
37
|
"lodash": "^4.17.15",
|
|
38
38
|
"parsimmon": "^1.13.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"\\.(?!json$)[^.]*$": "@glen/jest-raw-loader"
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "40a25ded1488372f082739f6d43e45f2ad918e7e",
|
|
63
63
|
"engines": {
|
|
64
64
|
"node": ">=16"
|
|
65
65
|
}
|
package/types/parse/Parser.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ declare class Parser {
|
|
|
13
13
|
* Should use parse() instance method instead of this static method whenever possible
|
|
14
14
|
*/
|
|
15
15
|
static parse(str: string, format: 'mysql' | 'postgres' | 'dbml' | 'dbmlv2' | 'schemarb' | 'mssql' | 'json'): Database;
|
|
16
|
+
static parse(str: RawDatabase, format: 'json'): Database;
|
|
16
17
|
parse(str: string, format: 'mysql' | 'postgres' | 'dbml' | 'dbmlv2' | 'schemarb' | 'mssql' | 'json'): Database;
|
|
18
|
+
parse(str: RawDatabase, format: 'json'): Database;
|
|
17
19
|
}
|
|
18
20
|
export default Parser;
|