Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 1620

Joomla! 4.x Coding • Updating schema for a module

$
0
0
So, I've developed a module and have it deployed on several sites and now I'm working on an update.

The problem is, I can't find the docs on how to update the table.

Code:

<install> <!-- Runs on install --><sql><file driver="mysql" charset="utf8">install.mysql.utf8.sql</file></sql></install><uninstall> <!-- Runs on uninstall --><sql><file driver="mysql" charset="utf8">uninstall.mysql.utf8.sql</file></sql></uninstall><update><sql><file driver="mysql" charset="utf8">update.mysql.utf8.sql</file></sql></update>
Surprisingly, that update didn't work so I googled around and found this:

Code:

<update>     <schemas>        <schemapath type="mysql">sql/mysql/updates</schemapath>    </schemas> </update>
The problem is, I can't find the documentation that goes with this.
So where do I go from here?

BTW, the update I need to apply is this:

Code:

ALTER TABLE `#__geotracker_visitors`  (   ADD COLUMN `last_visit` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'when last visited' AFTER `id`,  ADD COLUMN `num_visits` int UNSIGNED NOT NULL COMMENT 'number of visits' AFTER `last_visit`  )

Statistics: Posted by ppetree — Sun Mar 17, 2024 8:44 pm



Viewing all articles
Browse latest Browse all 1620

Trending Articles





<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>