mirror of https://github.com/Fabio286/antares.git
fix(MySQL): missing initial delimiter for exported procedures
This commit is contained in:
parent
f0351e5b94
commit
1a9fc37285
|
@ -9,7 +9,6 @@ function pgToString (value) {
|
|||
return value.toString();
|
||||
}
|
||||
|
||||
types.setTypeParser(20, a => parseInt(a));// bigint string to number
|
||||
types.setTypeParser(1082, pgToString); // date
|
||||
types.setTypeParser(1083, pgToString); // time
|
||||
types.setTypeParser(1114, pgToString); // timestamp
|
||||
|
|
|
@ -205,7 +205,7 @@ ${footer}
|
|||
sqlString += 'DELIMITER ;;\n';
|
||||
sqlString += '/*!50003 CREATE*/ ';
|
||||
sqlString += `/*!50017 DEFINER=${definer}*/ `;
|
||||
sqlString += `/*!50003 TRIGGER \`${name}\` ${timing} ${event} ON ${table} FOR EACH ROW ${statement}*/;;\n`;
|
||||
sqlString += `/*!50003 TRIGGER \`${name}\` ${timing} ${event} ON \`${table}\` FOR EACH ROW ${statement}*/;;\n`;
|
||||
sqlString += 'DELIMITER ;\n';
|
||||
sqlString += '/*!50003 SET SQL_MODE=@OLD_SQL_MODE */;\n\n';
|
||||
}
|
||||
|
@ -316,7 +316,7 @@ ${footer}
|
|||
const procedureBody = createProcedure.substring(startOffset);
|
||||
|
||||
let sqlString = 'DELIMITER ;;\n';
|
||||
sqlString = `/*!50003 DROP ${type} IF EXISTS ${name}*/;;\n`;
|
||||
sqlString += `/*!50003 DROP ${type} IF EXISTS ${name}*/;;\n`;
|
||||
sqlString += '/*!50003 SET @OLD_SQL_MODE=@@SQL_MODE*/;;\n';
|
||||
sqlString += `/*!50003 SET SQL_MODE="${sqlMode}"*/;;\n`;
|
||||
sqlString += `/*!50003 CREATE*/ /*!50020 DEFINER=${definer}*/ /*!50003 ${procedureBody}*/;;\n`;
|
||||
|
|
|
@ -76,6 +76,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
...mapActions({
|
||||
addNotification: 'notifications/addNotification',
|
||||
refreshSchema: 'workspaces/refreshSchema'
|
||||
}),
|
||||
async startImport (sqlFile) {
|
||||
|
|
Loading…
Reference in New Issue