Repository navigation
Commit eb3ee6f
committed
Run migrations only for databases from older driver versions
The repairs of DATETIME_PRECISION and temporal zero defaults ran on every
driver upgrade. The zero default repair can't tell a numeric zero from a
string zero in stored defaults, so running it again would change string
zero defaults that the current driver stores verbatim on purpose.
Run both repairs only when the database was last configured by driver
3.1.0 or older, the last version that stored these values incorrectly.
The saved version is read within the configuration transaction, before
it is updated.1 parent 6b7f989 commit eb3ee6f
2 files changed
Lines changed: 61 additions & 6 deletions
File tree
- packages/mysql-on-sqlite
- src/sqlite
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
96 | 100 | | |
97 | 101 | | |
98 | | - | |
99 | | - | |
| 102 | + | |
100 | 103 | | |
101 | 104 | | |
102 | 105 | | |
| |||
316 | 319 | | |
317 | 320 | | |
318 | 321 | | |
319 | | - | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
320 | 339 | | |
321 | 340 | | |
322 | 341 | | |
323 | 342 | | |
324 | 343 | | |
325 | | - | |
| 344 | + | |
326 | 345 | | |
327 | 346 | | |
328 | 347 | | |
| |||
337 | 356 | | |
338 | 357 | | |
339 | 358 | | |
340 | | - | |
| 359 | + | |
341 | 360 | | |
342 | 361 | | |
343 | 362 | | |
344 | 363 | | |
345 | | - | |
| 364 | + | |
346 | 365 | | |
347 | 366 | | |
348 | 367 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6010 | 6010 | | |
6011 | 6011 | | |
6012 | 6012 | | |
| 6013 | + | |
| 6014 | + | |
| 6015 | + | |
| 6016 | + | |
| 6017 | + | |
| 6018 | + | |
| 6019 | + | |
| 6020 | + | |
| 6021 | + | |
| 6022 | + | |
| 6023 | + | |
| 6024 | + | |
| 6025 | + | |
| 6026 | + | |
| 6027 | + | |
| 6028 | + | |
| 6029 | + | |
| 6030 | + | |
| 6031 | + | |
| 6032 | + | |
| 6033 | + | |
| 6034 | + | |
| 6035 | + | |
| 6036 | + | |
| 6037 | + | |
| 6038 | + | |
| 6039 | + | |
| 6040 | + | |
| 6041 | + | |
| 6042 | + | |
| 6043 | + | |
| 6044 | + | |
| 6045 | + | |
| 6046 | + | |
| 6047 | + | |
| 6048 | + | |
6013 | 6049 | | |
6014 | 6050 | | |
6015 | 6051 | | |
| |||
0 commit comments