Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error for reports with schedules after database migration to v1.0.0 #216

Closed
Svido opened this issue Oct 27, 2023 · 0 comments · Fixed by #220
Closed

Error for reports with schedules after database migration to v1.0.0 #216

Svido opened this issue Oct 27, 2023 · 0 comments · Fixed by #220
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Svido
Copy link

Svido commented Oct 27, 2023

Describe the bug

The column config ist NULL in table schedule after applying migration script for MariaDB 10.5.22 on Oracle Linux 8.
This leads to errors in the WebUI and reporting daemon referencing library/Reporting/Schedule.php line 58.

To Reproduce

Steps to reproduce the behavior:

  1. Update to v 1.0.0
  2. Execute Migration Script

Expected behavior

The migration should convert the

Screenshots

If applicable, add screenshots to help explain your problem.

Your Environment

  • Module version: 1.0.0
  • Dependent module versions:
  • Icinga Web 2 version and modules (System - About): 2.12
  • Web browser and version:
  • Icinga 2 version used (icinga2 --version):
  • PHP version used (php --version):
  • Server operating system and version: Oracle Linux 8

Additional context

The cause for the failing migration is the use of the named timezones for the function "CONVERT_TZ".
As the documentation states (https://mariadb.com/kb/en/convert_tz/), those are only available after loading them with "mysql_tzinfo_to_sql".
After restoring the previous version of the table and executing the migration script with
CONVERT_TZ(FROM_UNIXTIME(schedule_start / 1000), @@session.TIME_ZONE, 'UTC')
replaced by
CONVERT_TZ(FROM_UNIXTIME(schedule_start / 1000), '+02:00', '+00:00')
the migration worked.
As a sidenote, there is another small error. The DATE_FORMAT "%u" is for weeknumbers. You probably ment "%f" (https://mariadb.com/kb/en/date_format/).

@Svido Svido changed the title Database Migration to 1.0.0 lost schedules Error after Database Migration to 1.0.0 for reports with schedules Oct 27, 2023
@Svido Svido changed the title Error after Database Migration to 1.0.0 for reports with schedules Error for reports with schedules after database migration to v1.0.0 Oct 27, 2023
@yhabteab yhabteab added the bug Something isn't working label Nov 14, 2023
@yhabteab yhabteab added this to the 1.1.0 milestone Nov 14, 2023
@yhabteab yhabteab self-assigned this Nov 14, 2023
yhabteab added a commit that referenced this issue Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants