File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -17,14 +17,13 @@ const typeMap = {
17
17
'System Board' : 'Board' ,
18
18
} ;
19
19
20
- async function validate ( schema , items = [ ] , tableName , sql ) {
20
+ async function validate ( schema , items = [ ] , tableName ) {
21
21
try {
22
- return yup
22
+ return await yup
23
23
. array ( )
24
24
. of ( schema )
25
25
. validate ( items , { stripUnknown : true , abortEarly : false } ) ;
26
26
} catch ( err ) {
27
- err . sql = sql ;
28
27
err . validation = true ;
29
28
err . tableName = tableName ;
30
29
throw err ;
@@ -61,7 +60,7 @@ function fetchTable(base, tableName) {
61
60
}
62
61
63
62
async function validateForDb ( tableName , items ) {
64
- return validate ( dbSchemas [ tableName ] , items , tableName , true ) ;
63
+ return validate ( dbSchemas [ tableName ] , items , tableName ) ;
65
64
}
66
65
67
66
async function saveToDb ( tableName , items ) {
@@ -250,7 +249,7 @@ async function migrate(apiKey, baseId) {
250
249
251
250
throwNecessaryValidationErrors (
252
251
validatedSqlTables ,
253
- 'There were SQL schema errors during the migration! Please fix contact a developer about them.' ,
252
+ 'There were SQL schema errors during the migration! Please contact a developer about them.' ,
254
253
) ;
255
254
256
255
const [
You can’t perform that action at this time.
0 commit comments