Commit 3274a60
committed
fix: some boolean fields are NULL
This fixes a bug where boolean fields are NULL for columns that are
created when rows already exist. For these rows, the column is NULL,
which gorm doesn't handle well since we can only query for true of false.
This commit introduces a migration that updates those fields to the default
value, which is always false for booleans.
It's unclear if this is intended or an upstream bug in gorm, therefore I filed
go-gorm/gorm#5968.1 parent 4af23d6 commit 3274a60
1 file changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
16 | 33 | | |
17 | 34 | | |
0 commit comments