The current splitSql function is very flawed, as it doesn't support basic comments, or more complex procedures and transactions.
as a consequence, if you have a comment followed by a query in your component sql update files, the query will be ignored.
for example, this will be seen as a comment instead of one comment + 1 query
# this is my comment
UPDATE TABLE #__example_table ADD column eg VARCHAR(255);
Create a new sql update file for a component in the installer zip, adding some dummy column, like above
the query should run
the query just following the comment is ignored
This is undocumented, and very hard to debug for extensions maintainers, as putting comment happens ;)
Build | 3.2.4 | ⇒ | staging |
i checked, it works with --comment and /* comment*/
so it's just with # comment that there is an issue
I am going to close this at this time as a method has been shown for comments that works
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-01-28 13:11:57 |
Closed_By | ⇒ | brianteeman |
SQL update files do not work well with C style comments (# comment).
Did you try using comments like:
-- comment
Not sure, but you may also try to write a comment with
/* Comment */
Looking forward to your feedback.
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6975.