Regression from #1872 #2063

Closed
opened 2021-10-24 19:16:00 +00:00 by 2ke · 1 comment

There is a regression in commit 8bf97de140 that reverted most of the changes made in #1872. This results in bool - integer misconversions happening in Gitea again.

Dumping a table of entities containing boolean attributes from mysql to postgresql dialect does convert the column type from TINYINT(1) to BOOLEAN, but the inserted values are still "1" / "0" instead of "true"/ "false".
This causes errors when recovering the dump with psql:

psql -U gitea < gitea-db.sql
[...]
ERROR:  column "keep_email_private" is of type boolean but expression is of type integer
There is a regression in commit https://gitea.com/xorm/xorm/commit/8bf97de140c8af4ba4f61a9275a3ecb5b56d28f6 that reverted most of the changes made in #1872. This results in bool - integer misconversions happening in Gitea again. Dumping a table of entities containing boolean attributes from mysql to postgresql dialect does convert the column type from `TINYINT(1)` to `BOOLEAN`, but the inserted values are still `"1"` / `"0"` instead of `"true"`/ `"false"`. This causes errors when recovering the dump with psql: ``` psql -U gitea < gitea-db.sql [...] ERROR: column "keep_email_private" is of type boolean but expression is of type integer ```
Contributor

#2089 should refix the bools.

#2089 should refix the bools.
lunny closed this issue 2022-01-05 01:37:41 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xorm/xorm#2063
No description provided.