lms icon indicating copy to clipboard operation
lms copied to clipboard

Upgrade problem

Open tudor2k3 opened this issue 3 years ago • 7 comments

 After upgrading to latest git, i get the following errors at first login:

Query: ALTER TABLE customerassignments DROP CONSTRAINT customerassignment Error: Cannot drop index 'customerassignment': needed in a foreign key constraint

Query: CREATE TRIGGER customerassignments_insert_trigger BEFORE INSERT ON customerassignments FOR EACH ROW BEGIN IF NEW.startdate = 0 THEN SET NEW.startdate = UNIX_TIMESTAMP(); END IF; END Error: You do not have the SUPER privilege and binary logging is enabled (you might want to use the less safe log_bin_trust_function_creators variable)

 Running the first query manually works, the second gives an sql syntax error.
 MariaDB 10.5.12, PHP 7.4.23

tudor2k3 avatar Sep 14 '21 15:09 tudor2k3

What displays the following SQL query:

SELECT * FROM dbinfo;
  1. Before update?
  2. After update?

chilek avatar Sep 14 '21 15:09 chilek

MariaDB [lms]> SELECT * FROM dbinfo;

BEFORE upgrade:

+----------------------------------+--------------------------------------------------+ | keytype | keyvalue
| +----------------------------------+--------------------------------------------------+ | dbversion | 2021010700
| | last_check_for_updates_timestamp | 1631544461
| | unique_installation_id | cdb1f6b81f2d4fb8544ea496929e7abf05fec50e8046b342 | +----------------------------------+--------------------------------------------------+ 3 rows in set (0.001 sec)

AFTER upgrade:

+----------------------------------+--------------------------------------------------+ | keytype | keyvalue
| +----------------------------------+--------------------------------------------------+ | dbversion | 2021082800
| | last_check_for_updates_timestamp | 1631633382
| | unique_installation_id | cdb1f6b81f2d4fb8544ea496929e7abf05fec50e8046b342 | +----------------------------------+--------------------------------------------------+ 3 rows in set (0.001 sec)

Upgrade was done today.

În 14.09.2021 18:54, Tomasz Chiliński a scris:

What displays the following SQL query:

SELECT * FROM dbinfo;

  • Before update?
  • After update?

-- You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub [1], or unsubscribe [2]. Triage notifications on the go with GitHub Mobile for iOS [3] or Android [4].

Links:

[1] https://github.com/chilek/lms/issues/2136#issuecomment-919284085 [2] https://github.com/notifications/unsubscribe-auth/AD5KGSSZVPVXJVY7IWME7TDUB5VZ5ANCNFSM5EAO34CQ [3] https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 [4] https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

tudor2k3 avatar Sep 14 '21 16:09 tudor2k3

@tudor2k3 is this issue is actual?

interduo avatar Feb 05 '22 11:02 interduo

Upgrading from v27 LMS (at least my version) still gives some errors regarding updating existing customer assignments, but it gives a working install.

The only errors i receive after the update are when adding/editing customer assignments:

Query: SELECT id, value, label, taxed FROM taxes WHERE (validfrom = 0 OR validfrom <= 1644012000) AND (validto = 0 OR validto >= 1644098399) AND value = - ORDER BY value Error: 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 'ORDER BY value' at line 3

În 05.02.2022 13:50, Interduo a scris:

@tudor2k3 [1] is this issue is actual?

-- Reply to this email directly, view it on GitHub [2], or unsubscribe [3]. Triage notifications on the go with GitHub Mobile for iOS [4] or Android [5]. You are receiving this because you were mentioned.Message ID: @.***>

Links:

[1] https://github.com/tudor2k3 [2] https://github.com/chilek/lms/issues/2136#issuecomment-1030607643 [3] https://github.com/notifications/unsubscribe-auth/AD5KGSUQLDHKFBRZCATER4DUZUFIPANCNFSM5EAO34CQ [4] https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 [5] https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

tudor2k3 avatar Feb 05 '22 19:02 tudor2k3

Maybe You've got something messed up in DB in taxes table? Check it with doc/lms.mysql.

Also please migrate your db to postgresql. MySQL is not well tested.

interduo avatar Feb 06 '22 10:02 interduo

Tried with 2 separate installs: one (old) server from 5 years ago and a 5 months one. Same errors (like above).

I'll switch to postgresql and report back. Also, maybe add to docs "postgresql suggested"? Mysql was the default and (at least at install time) was the recommended one...

În 06.02.2022 12:10, Interduo a scris:

Maybe You've got something messed up in DB in taxes table? Check it with doc/lms.mysql.

Also please migrate your db to postgresql. MySQL is not well tested.

-- Reply to this email directly, view it on GitHub [1], or unsubscribe [2]. Triage notifications on the go with GitHub Mobile for iOS [3] or Android [4]. You are receiving this because you were mentioned.Message ID: @.***>

Links:

[1] https://github.com/chilek/lms/issues/2136#issuecomment-1030800646 [2] https://github.com/notifications/unsubscribe-auth/AD5KGSXAPQV6F2BGRBNCUQTUZZCKVANCNFSM5EAO34CQ [3] https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 [4] https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

tudor2k3 avatar Feb 06 '22 11:02 tudor2k3

No it wasn't. The docs are outdated ~10years.

PS Please login to github and see Your messages. You are sending to much mess in them.

interduo avatar Feb 06 '22 11:02 interduo