Skip to content

Conversation

@SebastianKrupinski
Copy link
Contributor

@SebastianKrupinski SebastianKrupinski commented Dec 11, 2025

  • Resolves:

Summary

  • added migration to change unsigned fields to signed
  • removed date restriction in backend

This fix essentially only effects MariaDB and MySql as PostgreSQL, SQLite and Oracle store int values as signed and are not affected.

Checklist

Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
@SebastianKrupinski SebastianKrupinski self-assigned this Dec 11, 2025
@SebastianKrupinski SebastianKrupinski added the 3. to review Waiting for reviews label Dec 11, 2025
@github-project-automation github-project-automation bot moved this to 🏗️ In progress in 💌 📅 👥 Groupware team Dec 11, 2025
@SebastianKrupinski SebastianKrupinski added this to the Nextcloud 33 milestone Dec 11, 2025
@SebastianKrupinski SebastianKrupinski marked this pull request as ready for review December 11, 2025 19:40
@SebastianKrupinski SebastianKrupinski requested review from ArtificialOwl, icewind1991, leftybournes and salmart-dev and removed request for a team December 11, 2025 19:40
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unsigned to signed means the value range halves and on mysql/mariadb outliers are silently clipped. but that is fine because we already use bigint so the range is big.

the risk of this change is that mysql/mariadb have to rebuild the table. the old and new data type have the same size, but their layout isn't identical.

nextcloud/calendar#6818 also mentions a 2038 limit. bigint does allow later dates. is this restricted elsewhere?

@SebastianKrupinski
Copy link
Contributor Author

nextcloud/calendar#6818 also mentions a 2038 limit. bigint does allow later dates. is this restricted elsewhere?

Yes, there are date limits in the calendar and other places that will need to be removed. The 2038 limit is a 32bit int limit, that can be removed also.

@ChristophWurst
Copy link
Member

How do we handle dates past 2038 on 32 bit systems?

@SebastianKrupinski
Copy link
Contributor Author

How do we handle dates past 2038 on 32 bit systems?

We don't lol, 32bit is dead. Intel / AMD 64bit came out in 2000, ARM was 2011.

Most Linux distros are dropping or have dropped 32bit versions, MS has stopped 32bit in 2020.

@ChristophWurst
Copy link
Member

Nextcloud does support 32bit systems. Older Raspberry Pi for example. This is also why the 64bit integer for snowflakes will be stored in a string instead of int.

@ChristophWurst
Copy link
Member

Nvm, looks like timestamps are explicitly exempt from the 32bit support: https://docs.nextcloud.com/server/stable/admin_manual/installation/system_requirements.html#cpu-architecture-and-os

32-bit systems are supported, with the following known limitations:

Dates before Unix Epoch (1970-01-01) are not supported

Dates after 2038 are not supported

This was referenced Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

Status: 🏗️ In progress

Development

Successfully merging this pull request may close these issues.

3 participants