@budibase/server 2.5.6-alpha.12 → 2.5.6-alpha.13
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/builder/assets/{index.5c1a6913.js → index.2fedbf1a.js} +1 -1
- package/builder/index.html +1 -1
- package/dist/api/controllers/table/utils.js +7 -2
- package/dist/package.json +7 -7
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/src/api/controllers/table/utils.ts +8 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/server",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "2.5.6-alpha.
|
|
4
|
+
"version": "2.5.6-alpha.13",
|
|
5
5
|
"description": "Budibase Web Server",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"license": "GPL-3.0",
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@apidevtools/swagger-parser": "10.0.3",
|
|
48
|
-
"@budibase/backend-core": "2.5.6-alpha.
|
|
49
|
-
"@budibase/client": "2.5.6-alpha.
|
|
50
|
-
"@budibase/pro": "2.5.6-alpha.
|
|
51
|
-
"@budibase/shared-core": "2.5.6-alpha.
|
|
52
|
-
"@budibase/string-templates": "2.5.6-alpha.
|
|
53
|
-
"@budibase/types": "2.5.6-alpha.
|
|
48
|
+
"@budibase/backend-core": "2.5.6-alpha.13",
|
|
49
|
+
"@budibase/client": "2.5.6-alpha.13",
|
|
50
|
+
"@budibase/pro": "2.5.6-alpha.12",
|
|
51
|
+
"@budibase/shared-core": "2.5.6-alpha.13",
|
|
52
|
+
"@budibase/string-templates": "2.5.6-alpha.13",
|
|
53
|
+
"@budibase/types": "2.5.6-alpha.13",
|
|
54
54
|
"@bull-board/api": "3.7.0",
|
|
55
55
|
"@bull-board/koa": "3.9.4",
|
|
56
56
|
"@elastic/elasticsearch": "7.10.0",
|
|
@@ -176,5 +176,5 @@
|
|
|
176
176
|
"optionalDependencies": {
|
|
177
177
|
"oracledb": "5.3.0"
|
|
178
178
|
},
|
|
179
|
-
"gitHead": "
|
|
179
|
+
"gitHead": "93481829168c6c8225943dba4e46ad606ca8c4bd"
|
|
180
180
|
}
|
|
@@ -110,19 +110,25 @@ export function importToRows(
|
|
|
110
110
|
table: Table,
|
|
111
111
|
user: ContextUser | null = null
|
|
112
112
|
) {
|
|
113
|
+
let originalTable = table
|
|
113
114
|
let finalData: any = []
|
|
114
115
|
for (let i = 0; i < data.length; i++) {
|
|
115
116
|
let row = data[i]
|
|
116
117
|
row._id = generateRowID(table._id!)
|
|
117
118
|
row.tableId = table._id
|
|
119
|
+
|
|
120
|
+
// We use a reference to table here and update it after input processing,
|
|
121
|
+
// so that we can auto increment auto IDs in imported data properly
|
|
118
122
|
const processed = inputProcessing(user, table, row, {
|
|
119
123
|
noAutoRelationships: true,
|
|
120
124
|
})
|
|
121
125
|
row = processed.row
|
|
122
126
|
table = processed.table
|
|
123
127
|
|
|
124
|
-
|
|
125
|
-
|
|
128
|
+
// However here we must reference the original table, as we want to mutate
|
|
129
|
+
// the real schema of the table passed in, not the clone used for
|
|
130
|
+
// incrementing auto IDs
|
|
131
|
+
for (const [fieldName, schema] of Object.entries(originalTable.schema)) {
|
|
126
132
|
if (
|
|
127
133
|
(schema.type === FieldTypes.OPTIONS ||
|
|
128
134
|
schema.type === FieldTypes.ARRAY) &&
|