Repository navigation
Commit 95d9c4e
committed
fix(core): recover legacy database migration history without a name column
Some existing installs' __drizzle_migrations table predates the "name"
column (older Drizzle journal format) and only has created_at
timestamps. The old seeding query silently inserted NULL/nothing for
those rows, so the new migration runner would think those migrations
were never applied and replay already-applied SQL against those
databases.
Ported from upstream/dev (fix(core): recover legacy database migration
history, anomalyco#45061): detect whether the table has a
"name" column via pragma_table_info, and when it doesn't, match each
row's created_at timestamp to a migration id prefix instead.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015KrFrdVEmx7apnofWUViJw1 parent d3c7b53 commit 95d9c4e
1 file changed
Lines changed: 33 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
63 | 90 | | |
64 | 91 | | |
65 | 92 | | |
| |||
0 commit comments