1 / 7
Apr 2020

I’m using the older version of egroupware, what’s the best way to create and maintain a new custom table in the database.
I need the new table for my custom programming
How will the database tables be affected after the upgrade.

This is my version currently
versions’ =>
array (size=5)
‘current_header’ => string ‘1.29’ (length=4)
‘maintenance_release’ => string ‘17.1.20180720’ (length=13)
‘api’ => string ‘17.1.003’ (length=8)
‘phpgwapi’ => string ‘17.1.003’ (length=8)
‘header’ => string ‘1.29’ (length=4)

  • created

    Apr '20
  • last reply

    Apr '20
  • 6

    replies

  • 1.5k

    views

  • 3

    users

  • 8

    links

EGroupware will not touch a table it does not know about, unless your table uses a name a new table we want to create, thought that will stop our installation.

All EGroupware tables have a “egw_” prefix, so if you choose a different one, you’re save.

Ralf

okay thanks,

I was trying the upgrade and I noticed this error on login, not sure if anything additional needs to be done

Invalid SQL: UPDATE egw_access_log SET WHERE
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘WHERE’ at line 1 (1064)

could be because of session data

Hi Vishakha.

Two notes from me:

Please give your version like here


described. This is easier.

We have an example app in GitHub and a documentation/video for creating a database table:

Maybe this will help you too.

Stefan

okay thanks
noted the above points you mentioned.

Did it with composer, followed the below steps

php -r "copy(‘https://getcomposer.org/installer’, ‘composer-setup.php’);"
php -r "if (hash_file(‘sha384’, ‘composer-setup.php’) === ‘e0012edf3e80b6978849f5eff0d4b4e4c79ff1609dd1e613307e16318854d24ae64f26d17af3ef0bf7cfb710ca74755a’) { echo ‘Installer verified’; } else { echo ‘Installer corrupt’; unlink(‘composer-setup.php’); } echo PHP_EOL;"
vim /etc/php/php.ini:
open_basedir =+ :/root/
php composer-setup.php
ln -s /home/projetc1/composer.phar /usr/local/bin/composer
pacman -S nodejs npm
npm install grunt
pacman -S php-xsl
vim /etc/php/php.ini:
uncomment:
extension=xsl.so
extension=bcmath.so
composer create-project --prefer-source --keep-vcs egroupware/egroupware

  • This occurs after login
  • Maria db is ued
  • lighttpd server is used
  • PHP version is 7.2
  • installation type : archive instalation

This is in my server log

FastCGI-stderr: Database error (EGroupware\Api\Db\Exception\InvalidSql): Invalid SQL: UPDATE egw_access_log SET WHERE
FastCGI-stderr: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘WHERE’ at line 1 (1064)
FastCGI-stderr: #0 /project path/egroupware/api/src/Db/Deprecated.php(64): EGroupware\Api\Db->query(‘UPDATE egw_acce…’, NULL, NULL, 0, -1, false, 3, true)
FastCGI-stderr: #1 /project path/egroupware/api/src/Db.php(1980): EGroupware\Api\Db\Deprecated->query(‘UPDATE egw_acce…’, 1830, ‘/…’, 0, -1, false)
FastCGI-stderr: #2 /hproject path/egroupware/api/src/Session.php(1830): EGroupware\Api\Db->update(‘egw_access_log’, Array, Array, 1830, ‘/…’)
FastCGI-stderr: #3 /project path/egroupware/api/src/Session.php(1307): EGroupware\Api\Session->update_dla(true)
FastCGI-stderr: #4 /project path/egroupware/api/src/Egw.php(299): EGroupware\Api\Session->verify()
FastCGI-stderr: #5 /project path/egroupware/api/src/Egw.php(254): EGroupware\Api\Egw->verify_session()
FastCGI-stderr: #6 /project path/egroupware/api/src/loader.php(83): EGroupware\Api\Egw->wakeup2()
FastCGI-stderr: #7 /project path/egroupware/header.inc.php(81): require_once(’/…’)

That error is not from an update, but a session getting restored. Maybe it’s from before the update …
Try logging out via it’s URL https://example.org/egroupware/logout.php3

Btw. did you run the database update, it’s required for a manual installation, you done.

Ralf