You'll encounter an SQL error once you downgrade to an older version. This also happens if the database does not contain any version information. Installing the latest version will cause the SQL error because the installer tries to create database structures which are already there. You can fix this by changing the schema version in the database manually.
Use this query to find out the current version:
select * from #__schemas where extension_id in ( select extension_id from #__extensions where element = 'com_eventgallery' );
It should match the latest version you had installed.
Check the current version for com_eventgallery in the database.
Find the current version for com_eventgallery in the database manually.
Use this query to update the schema version:
update #__schemas set version_id='3.11.2_2019-11-20' where extension_id in ( select extension_id from #__extensions where element = 'com_eventgallery' );
Once you did this you can install the latest version again.
Don't forget to replace
Find the database prefix.
Joomla performs database updates by comparing the file names of some
SQL files against each other. The name of the latest version is stored
in the database. You can find those SQL files in
. Instead of using the value for the column
version_id in the SQL statement above you
can try to use the file names in this folder as version numbers. You'll
see file names like "3.3.0, 3.4.0, 3.4.0_2015-04-14". Try to repeat the following
steps until the installation finished successfully. Start with the oldest version number.
That's usually the version you had installed before.
#_schema table to a specific version like
3.4.0_2015-04-14. Always start with the oldest version! use the SQL statement above to do that.
Install the whole package using the Joomla! Extension Manager.
If you see an SQL error continue with step 1.
In case the query above does not work because it does not return any result, you need to insert a new row into the database.
Query result in case the database version is missing.
You can use this code:
insert into #_schemas (extension_id, version_id) select extension_id, '1.0.0' from #_extensions where element = 'com_eventgallery'
Execute the insert statement.
Starting with Event Gallery 3.7.8 you can fix missing version information using the System Check page. If the version information is missing in the database, you just need to click the fix link on that page to add it. You can now install the update.