Page 1 of 1

mysql-Update-Files not executed by Update

Posted: Sun Sep 09, 2018 10:00 pm
by tria1312
Hi all,

I'd like to my update-file which I have stored in sql/updates/mysql/01.01.02.sql to be executed when the user updates my component from version 01.01.01 to version 01.01.02.
But it doesn't.

Here is my code:

Code: Select all

	<update>
		<schemas>
			<schemapath type="mysql">sql/updates/mysql</schemapath>
		</schemas>
	</update>
After the update the database changes are not done.

What is wrong or what do I have to check?


Best Regards
tria1312

Re: mysql-Update-Files not executed by Update

Posted: Sun Sep 09, 2018 10:59 pm
by Webdongle
Please describe how you are attempting to update.
Also please viewtopic.php?f=714&t=793531

Re: mysql-Update-Files not executed by Update

Posted: Mon Sep 10, 2018 7:35 pm
by tria1312
I have an Updateserver on my own Webserver. The update download of the updates from that server ist working.
But when Joomla ist installing all the files on the server an tries to update the database, it seems the sql-Statement files are not found or not used ... I do not know.
My files are name like:

Code: Select all

sql/updates/mysql/01.01.02.sql 
or

Code: Select all

sql/updates/mysql/01.01.03.sql 
The content of these files are working correctly. I have tested this before directly on my testing database.

Is there a possibility to test the update process in an easy manor?


Best Regards
tria1312

Re: mysql-Update-Files not executed by Update

Posted: Mon Sep 10, 2018 8:04 pm
by Webdongle
We can not help you with the inadequacies of your server.

The correct way of updating Joomla is https://docs.joomla.org/J3.x:Updating_f ... ng_version

Re: mysql-Update-Files not executed by Update

Posted: Mon Sep 10, 2018 8:14 pm
by tria1312
Hi,

this is the way an update is usually done in Joomla. Yes. And my component follows exactly that way and it fetches the updates from my own update server. There is nothing inadequate.
The problem is in the behavior how Joomla updates the mySQL-Database or the way I understand the behavior.

My server is ok. And also the update process is ok. But what does Joomla do with the mySQL-Update files. Where does Joomla search form them (I gave the right pathes in the component PHP-File)? Is it written correctly? Do I have a slash at the right position or is there someting missing.
This is what I expect from the experts here to answer.

Does anyone know, how to fix my problem? Or at least, how to debug it instead of counter the version numbers up and up and up?


BTW: Here is the link with explanations how to create an update server:https://docs.joomla.org/J3.x:Developing ... ate_server

Re: mysql-Update-Files not executed by Update

Posted: Mon Sep 10, 2018 8:38 pm
by Webdongle
Oh you are updating your component not Joomla?

Re: mysql-Update-Files not executed by Update

Posted: Wed Oct 17, 2018 7:29 pm
by tria1312
Yes you are right

Re: mysql-Update-Files not executed by Update

Posted: Wed Oct 17, 2018 8:36 pm
by Webdongle
afaik ... editing the tables (of your Component) is done in a similar manner as when your component installs. Your Component's zip file contains a manifest file that references the sql file(s) ... Joomla then knows where to find them to run them.