Joseph Doherty
c7dfc21b4c
fix(db): idempotent migration script runs clean on SQL Server ( #126 )
...
`dotnet ef migrations script --idempotent` puts each migration in ONE batch
behind IF NOT EXISTS guards, and SQL Server compiles the whole batch before any
guard runs. AddAuditLogHashChain adds ChainSeq and then creates two filtered
indexes whose WHERE clause references it in the same batch, so the script
failed with Msg 207 "Invalid column name 'ChainSeq'" on any DB at migration
<= 60 (the 2026-11-11 vd03 deploy hand-inserted GO separators instead).
- AddAuditLogHashChain: the two CREATE INDEX statements go through EXEC(N'...')
so they compile at execution time. Same indexes, same snapshot; Migrate() /
database update unaffected; DBs that already ran the migration never run it
again. The column-level GRANT compiles fine (checked at execution).
- Audit of 58-64: no other migration hits the pattern (the idempotent script
from 57 now runs clean end to end; AddConfigGraphRowVersions' plain CREATE
INDEX on a new column is not compile-checked).
- docs/plans/sql/AddAuditLogHashChain.sql: same EXEC wrap. It, and
PrefixSearchIndexes.sql / AddConfigGraphRowVersions.sql, also carried a
stray UTF-8 BOM after the prepended header comment that made sqlcmd fail
with Msg 102 on line 1 of the batch; removed.
- New IdempotentMigrationScriptTests: migrates the fixture DB to 57, runs the
generated idempotent script batch by batch, asserts every migration applied,
then re-runs it as a no-op. Fails with Msg 207 without the migration fix.
Co-Authored-By: Claude <noreply@anthropic.com >
2026-11-12 06:55:04 -05:00
..
2026-06-01 00:23:00 -04:00
2026-11-12 06:55:04 -05:00
2026-08-01 08:53:56 -04:00
2026-08-01 08:53:56 -04:00
2026-05-28 09:37:45 -04:00
2026-08-01 08:53:56 -04:00
2026-05-28 09:37:45 -04:00
2026-08-01 08:53:56 -04:00
2026-05-28 09:37:45 -04:00
2026-08-01 08:53:56 -04:00
2026-06-01 00:23:00 -04:00
2026-05-28 09:37:45 -04:00
2026-08-01 08:53:56 -04:00
2026-05-28 09:37:45 -04:00
2026-08-01 08:53:56 -04:00
2026-05-28 09:37:45 -04:00
2026-08-01 11:15:24 -04:00
2026-05-28 09:37:45 -04:00
2026-08-01 12:37:48 -04:00
2026-08-01 08:53:56 -04:00
2026-05-28 09:37:45 -04:00
2026-08-01 08:53:56 -04:00
2026-06-01 00:23:00 -04:00
2026-05-28 09:37:45 -04:00
2026-08-01 08:53:56 -04:00
2026-05-28 09:37:45 -04:00
2026-08-01 08:53:56 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-08-01 08:53:56 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-08-01 08:53:56 -04:00
2026-05-28 09:37:45 -04:00
2026-08-01 08:53:56 -04:00
2026-05-28 09:37:45 -04:00
2026-08-01 08:53:56 -04:00
2026-05-28 09:37:45 -04:00
2026-08-01 08:53:56 -04:00
2026-05-31 21:50:38 -04:00
2026-08-01 08:53:56 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-08-01 08:53:56 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-08-01 08:53:56 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-08-01 08:53:56 -04:00
2026-05-28 09:37:45 -04:00
2026-08-01 08:53:56 -04:00
2026-08-01 08:53:56 -04:00
2026-08-01 08:53:56 -04:00
2026-05-28 09:37:45 -04:00
2026-08-01 08:53:56 -04:00
2026-05-31 23:32:53 -04:00
2026-08-01 12:34:34 -04:00
2026-06-02 01:23:52 -04:00
2026-05-24 07:26:20 -04:00
2026-06-16 20:37:51 -04:00
2026-08-01 12:34:34 -04:00
2026-06-16 20:30:29 -04:00
2026-06-16 20:30:29 -04:00
2026-05-29 07:28:21 -04:00
2026-05-29 07:39:44 -04:00
2026-05-29 08:12:43 -04:00
2026-06-01 00:23:00 -04:00
2026-08-01 12:41:24 -04:00
2026-08-07 01:56:33 -04:00
2026-08-01 08:53:56 -04:00
2026-07-10 12:49:44 -04:00
2026-06-01 00:23:00 -04:00
2026-05-31 03:29:37 -04:00
2026-11-10 15:11:45 -05:00
2026-05-31 21:39:23 -04:00
2026-05-31 22:05:13 -04:00
2026-06-03 13:58:14 -04:00
2026-06-03 15:24:05 -04:00
2026-08-01 08:53:56 -04:00
2026-06-05 09:39:35 -04:00
2026-06-05 09:52:12 -04:00
2026-08-01 08:53:56 -04:00
2026-06-06 11:23:59 -04:00
2026-06-06 11:44:56 -04:00
2026-06-06 12:37:47 -04:00
2026-06-06 13:55:19 -04:00
2026-06-06 13:59:21 -04:00
2026-06-06 14:31:18 -04:00
2026-06-06 16:10:07 -04:00
2026-06-07 03:26:25 -04:00
2026-06-07 04:33:16 -04:00
2026-06-07 09:53:34 -04:00
2026-06-07 10:00:48 -04:00
2026-06-07 10:31:02 -04:00
2026-08-01 08:53:56 -04:00
2026-06-15 15:04:28 -04:00
2026-08-01 08:53:56 -04:00
2026-06-15 09:32:14 -04:00
2026-08-01 08:53:56 -04:00
2026-06-16 08:31:19 -04:00
2026-06-16 08:35:05 -04:00
2026-06-16 08:55:09 -04:00
2026-11-10 15:11:45 -05:00
2026-11-10 15:11:45 -05:00
2026-08-01 08:53:56 -04:00
2026-06-16 21:10:21 -04:00
2026-06-16 21:12:52 -04:00
2026-08-01 08:53:56 -04:00
2026-06-16 16:34:56 -04:00
2026-06-16 15:16:06 -04:00
2026-06-16 16:34:56 -04:00
2026-06-16 18:34:34 -04:00
2026-06-16 17:13:14 -04:00
2026-06-16 18:27:10 -04:00
2026-06-16 19:07:32 -04:00
2026-06-16 19:09:12 -04:00
2026-08-01 08:53:56 -04:00
2026-06-17 14:06:08 -04:00
2026-06-17 14:14:58 -04:00
2026-08-01 08:53:56 -04:00
2026-07-10 12:18:46 -04:00
2026-06-17 19:32:58 -04:00
2026-08-01 08:53:56 -04:00
2026-11-10 15:11:45 -05:00
2026-08-01 08:53:56 -04:00
2026-09-10 15:23:09 -04:00
2026-07-10 09:29:38 -04:00
2026-08-01 08:53:56 -04:00
2026-07-10 12:49:44 -04:00
2026-06-18 01:57:18 -04:00
2026-08-01 08:53:56 -04:00
2026-06-18 05:25:04 -04:00
2026-06-18 05:29:39 -04:00
2026-08-01 08:53:56 -04:00
2026-06-18 10:01:38 -04:00
2026-06-18 10:08:57 -04:00
2026-08-01 08:53:56 -04:00
2026-06-18 19:18:49 -04:00
2026-06-18 19:01:54 -04:00
2026-08-01 11:28:46 -04:00
2026-08-01 08:53:56 -04:00
2026-06-19 09:34:45 -04:00
2026-06-19 09:38:32 -04:00
2026-08-01 08:53:56 -04:00
2026-09-02 12:52:56 -04:00
2026-06-26 05:01:16 -04:00
2026-06-26 05:19:24 -04:00
2026-08-01 08:53:56 -04:00
2026-06-26 17:35:07 -04:00
2026-06-26 17:35:07 -04:00
2026-06-27 12:04:12 -04:00
2026-06-27 12:09:49 -04:00
2026-06-27 14:07:25 -04:00
2026-09-11 10:17:02 -04:00
2026-11-10 16:46:42 -05:00
2026-07-13 09:49:53 -04:00
2026-08-01 08:53:56 -04:00
2026-08-01 08:53:56 -04:00
2026-07-19 02:34:38 -04:00
2026-08-01 08:53:56 -04:00
2026-07-20 05:37:48 -04:00
2026-11-10 15:11:45 -05:00
2026-07-20 02:15:53 -04:00
2026-08-07 01:56:33 -04:00
2026-11-10 15:11:45 -05:00
2026-08-15 19:26:37 -04:00
2026-08-01 08:53:56 -04:00
2026-08-07 01:56:33 -04:00
2026-08-01 08:53:56 -04:00
2026-11-10 15:11:45 -05:00
2026-07-22 07:49:51 -04:00
2026-07-24 04:33:20 -04:00
2026-08-01 08:53:56 -04:00
2026-08-01 08:53:56 -04:00
2026-07-23 15:22:22 -04:00
2026-08-01 08:53:56 -04:00
2026-08-07 11:39:28 -04:00
2026-08-07 08:51:39 -04:00
2026-08-10 07:29:06 -04:00
2026-08-10 06:05:04 -04:00
2026-08-10 07:00:12 -04:00
2026-08-11 06:03:06 -04:00
2026-11-10 15:11:45 -05:00
2026-08-12 18:10:02 -04:00
2026-08-14 19:23:56 -04:00
2026-08-14 20:30:35 -04:00
2026-08-15 04:14:49 -04:00
2026-08-17 05:22:42 -04:00
2026-08-15 20:27:09 -04:00
2026-08-15 03:13:51 -04:00
2026-08-14 21:47:48 -04:00
2026-08-14 21:45:23 -04:00
2026-08-17 03:58:41 -04:00
2026-08-18 10:32:46 -04:00
2026-11-10 16:46:42 -05:00
2026-08-18 05:38:00 -04:00
2026-11-10 16:46:42 -05:00
2026-08-18 10:32:46 -04:00
2026-08-19 14:01:23 -04:00
2026-08-20 08:56:50 -04:00
2026-08-19 15:07:24 -04:00
2026-08-20 16:01:33 -04:00
2026-08-20 15:49:36 -04:00
2026-08-20 16:12:13 -04:00
2026-08-21 08:01:37 -04:00
2026-08-21 06:20:50 -04:00
2026-08-21 06:20:50 -04:00
2026-08-21 08:01:37 -04:00
2026-08-21 08:07:22 -04:00
2026-08-21 08:07:22 -04:00
2026-08-28 15:10:21 -04:00
2026-08-28 14:18:01 -04:00
2026-08-28 15:06:22 -04:00
2026-11-10 15:11:45 -05:00
2026-09-02 12:55:22 -04:00
2026-11-10 15:11:45 -05:00
2026-11-10 15:11:45 -05:00
2026-11-10 15:11:45 -05:00
2026-11-09 22:22:44 -05:00
2026-09-06 14:35:10 -04:00
2026-09-06 00:46:32 -04:00
2026-09-06 14:35:10 -04:00
2026-09-06 14:47:48 -04:00
2026-09-06 14:47:48 -04:00
2026-09-06 10:48:03 -04:00
2026-09-06 11:16:24 -04:00
2026-09-06 01:33:41 -04:00
2026-09-06 01:33:41 -04:00
2026-09-06 02:17:31 -04:00
2026-09-06 12:35:52 -04:00
2026-09-08 00:54:26 -04:00
2026-09-08 01:47:49 -04:00
2026-09-08 01:47:49 -04:00
2026-09-08 09:56:07 -04:00
2026-09-08 10:04:45 -04:00
2026-09-08 10:04:45 -04:00
2026-11-10 15:11:45 -05:00
2026-11-10 06:12:34 -05:00
2026-09-09 11:21:52 -04:00
2026-09-09 13:03:37 -04:00
2026-09-09 13:03:37 -04:00
2026-09-10 14:49:12 -04:00
2026-11-10 04:38:05 -05:00
2026-09-10 15:15:27 -04:00
2026-09-10 15:15:27 -04:00
2026-09-10 01:20:12 -04:00
2026-11-09 15:09:54 -05:00
2026-11-10 15:11:45 -05:00
2026-09-11 10:46:05 -04:00
2026-11-09 22:38:55 -05:00
2026-09-14 13:28:49 -04:00
2026-09-14 14:38:32 -04:00
2026-09-28 10:36:42 -04:00
2026-09-29 10:56:53 -04:00
2026-09-28 21:46:49 -04:00
2026-09-28 17:17:05 -04:00
2026-09-28 17:17:05 -04:00
2026-11-10 15:11:45 -05:00
2026-11-09 22:52:16 -05:00
2026-11-10 04:42:03 -05:00
2026-11-09 16:04:28 -05:00
2026-11-09 17:06:01 -05:00
2026-11-09 22:50:18 -05:00
2026-11-09 17:42:28 -05:00
2026-11-10 16:46:42 -05:00
2026-05-28 09:37:45 -04:00
2026-06-01 00:23:00 -04:00
2026-07-23 12:54:32 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-08-10 06:56:56 -04:00
2026-11-10 16:46:42 -05:00
2026-08-10 06:56:56 -04:00
2026-08-01 08:53:56 -04:00