Preparations
- replace contents of the /modules/custom/install/project_upgrades.sql file with this (replace 52x_ with your table prefix from /system/config.php):
# r1: Initial Project Task (#TASK_ID) SELECT FirstName FROM `52x_Users`; # some comment above error ERROR1 ERROR2 ERROR3 ERROR4 ERROR5 ERROR6 ERROR7 ERROR8 ERROR9 ERROR10 ERROR11 ERROR12 ERROR13 ERROR14 ERROR15 ERROR16 ERROR17 ERROR18 ERROR19 ERROR20 ERROR21; SELECT LastName FROM `52x_Users`; # some comment below error
- clear contents of /system/.restricted/project_upgrades.log file
- execute UPDATE 52x_Modules` SET AppliedDBRevisions = NULL; (replace 52x_` with your table prefix from /system/config.php) database query
Test itself
- run the php tools/run_event.php adm:OnDeploy b674006f3edb1d9cd4d838c150b0567d script
- confirm, that contents of SQL-related part of deployment script output looks like this:
# r1: Initial Project Task (#TASK_ID) SELECT FirstName FROM `52x_Users` ... OK (4) # some comment above error ERROR1 ERROR2 ERROR3 ERROR4 ERROR5 ERROR6 ERROR7 ERROR8 ERROR9 ERROR10 ERROR11 ERROR12 ERROR13 ERROR14 ERROR15 ERROR16 E ... FAILED SQL Error #1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ERROR1 ERROR2 ERROR3 ERROR4 ERROR5 ERROR6 ERROR7 ERROR8 ERROR9 ERROR10 ERROR11 E' at line 1 Execute rest of SQLs in this Revision (show below) by hand and RUN deployment script again to complete the deployment process. ======== ERROR1 ERROR2 ERROR3 ERROR4 ERROR5 ERROR6 ERROR7 ERROR8 ERROR9 ERROR10 ERROR11 ERROR12 ERROR13 ERROR14 ERROR15 ERROR16 ERROR17 ERROR18 ERROR19 ERROR20 ERROR21; SELECT LastName FROM `52x_Users`; # some comment below error ========
- confirm, that from the above output:
- the # some comment above error and # some comment below error are shown in magenta color (as all comments should be)
- the SQL Error line is shown in red color (as FAILED text in the line above it)
- the Execute rest of SQLs in this Revision (show below) by hand and RUN deployment script again to complete the deployment process. line in shown in bright red color (like bold in CLI)
- confirm, that text added into /system/.restricted/project_upgrades.log looks like this (execution start/end date/times would be different, but durations must match):
[2020-12-28 16:39:08] === === [2021-05-03 19:59:11] === === SELECT FirstName FROM `52x_Users` ... OK (4) # some comment above error ERROR1 ERROR2 ERROR3 ERROR4 ERROR5 ERROR6 ERROR7 ERROR8 ERROR9 ERROR10 ERROR11 ERROR12 ERROR13 ERROR14 ERROR15 ERROR16 ERROR17 ERROR18 ERROR19 ERROR20 ERROR21 ... FAILED SQL Error #1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ERROR1 ERROR2 ERROR3 ERROR4 ERROR5 ERROR6 ERROR7 ERROR8 ERROR9 ERROR10 ERROR11 E' at line 1 Execute rest of SQLs in this Revision (show below) by hand and RUN deployment script again to complete the deployment process. ======== ERROR1 ERROR2 ERROR3 ERROR4 ERROR5 ERROR6 ERROR7 ERROR8 ERROR9 ERROR10 ERROR11 ERROR12 ERROR13 ERROR14 ERROR15 ERROR16 ERROR17 ERROR18 ERROR19 ERROR20 ERROR21 SELECT LastName FROM `52x_Users` # some comment below error ========