Commit 25a878b
Prove carry-forward of package migrations over customized published set
Addresses zorporation/durable-workflow#400. Follows the TD-034 close
(#32) which delivered fresh-install, publish-first, and repair-path
tests but swapped prose for an automated test on the customized-
migration path. The customized path that is actually testable in-
package is the documented "publish, keep schema-compatible edits, and
carry each new package migration forward in timestamp order" pattern —
this test exercises it end to end.
The test:
1. Publishes the package migrations, then deletes the repair migration
(2026_04_16_000158) to simulate a snapshot taken before #32 fix.
2. Strips the memo column from the published workflow_run_summaries
migration, simulating that older snapshot predated the memo column.
3. Adds a schema-compatible extra index on workflow_instances
(workflow_class) to the published create_workflow_instances
migration — a realistic user customization.
4. Drops all tables, migrates from the published path, asserts the
schema came up without memo and with the custom index.
5. Copies the new repair migration from src/migrations/ into the
published dir (the documented carry-forward step) and runs migrate
again.
6. Asserts memo is now present AND the custom index survived the
carry-forward run.
Verified in isolation (phpunit --filter
testCarryingForwardPackageMigrationOverCustomizedPublishedSet):
1 test, 9 assertions pass on PHP 8.4 + SQLite.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ae0192c commit 25a878b
1 file changed
Lines changed: 93 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
150 | 243 | | |
151 | 244 | | |
152 | 245 | | |
| |||
0 commit comments