secufusion-mcp 2.1.6 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/agents/AGENTS.md +224 -31
- package/agents/reviewer.md +231 -304
- package/commands/sfn-code.md +72 -6
- package/commands/sfn-init.md +506 -36
- package/commands/sfn-review.md +695 -30
- package/mcp/dist/parsers/events.js +11 -4
- package/mcp/dist/server.js +253 -1396
- package/package.json +2 -2
- package/scripts/.secufusion-migrations.json +395 -0
- package/scripts/.secufusion-project-spec.json +857 -0
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "secufusion-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "SecuFusion MCP server - developer workflow tooling with guardrails",
|
|
5
|
+
"description": "Project-level spec driven AI workflow tooling for SecuFusion, MCP server - developer workflow tooling with guardrails",
|
|
6
6
|
"main": "mcp/dist/server.js",
|
|
7
7
|
"files": [
|
|
8
8
|
".claude-plugin",
|
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"generated_at": "2026-09-23T02:17:00+05:30",
|
|
4
|
+
"generated_from": "workspace scan - all files read, no values invented",
|
|
5
|
+
"workspace_root": "C:/Users/Yash/Desktop/secufi_full",
|
|
6
|
+
"tool": "secufusion-mcp migration scanner",
|
|
7
|
+
"next_update": "run /sfn:refresh to update"
|
|
8
|
+
},
|
|
9
|
+
|
|
10
|
+
"migration_tool": {
|
|
11
|
+
"type": "manual_scripts",
|
|
12
|
+
"tool_name": "none - Flyway-style naming convention used, but NOT executed by Flyway on boot",
|
|
13
|
+
"note": "Scripts follow V{n}__{description}.sql naming compatible with Flyway but applied MANUALLY. No spring.flyway.* config found in any application.properties. Scripts explicitly state: migrations are applied MANUALLY in this project - nothing applies on startup.",
|
|
14
|
+
"how_applied": "manually - developer runs SQL directly against target PostgreSQL database via psql or DB client",
|
|
15
|
+
"applied_by": "not_documented - inferred: developer or DBA per deploy",
|
|
16
|
+
"tracking_mechanism": "not_documented - no flyway_schema_history table, no spreadsheet found; version numbers in filenames serve as the only ordering record",
|
|
17
|
+
"database": "PostgreSQL (confirmed from pg_dump headers in local/schema.sql and local/seed.sql)"
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
"services": {
|
|
21
|
+
|
|
22
|
+
"sfn-events-api": {
|
|
23
|
+
"repo": "sfn-events-api",
|
|
24
|
+
"has_migrations": true,
|
|
25
|
+
|
|
26
|
+
"migration_locations": [
|
|
27
|
+
{
|
|
28
|
+
"path": "src/main/resources/db/migration",
|
|
29
|
+
"type": "migration_scripts",
|
|
30
|
+
"file_count": 39,
|
|
31
|
+
"description": "All versioned DDL migration scripts for the events database. Contains CREATE TABLE, ALTER TABLE, CREATE VIEW, CREATE INDEX, and data-fix DML. Flat folder, no subfolders."
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
|
|
35
|
+
"other_sql_locations": [],
|
|
36
|
+
|
|
37
|
+
"naming_convention": {
|
|
38
|
+
"pattern": "V{n}__{snake_case_description}.sql",
|
|
39
|
+
"example": "V1__create_devices_table.sql",
|
|
40
|
+
"examples_spread": [
|
|
41
|
+
"V1__create_devices_table.sql",
|
|
42
|
+
"V3__create_aggregation_views.sql",
|
|
43
|
+
"V5__add_composite_indexes.sql",
|
|
44
|
+
"V21__backfill_event_device_user_links.sql",
|
|
45
|
+
"V39__purge_legacy_device_keyed_ai_inventory.sql"
|
|
46
|
+
],
|
|
47
|
+
"has_version_prefix": true,
|
|
48
|
+
"version_format": "V{integer}__ (capital V, integer, double underscore)",
|
|
49
|
+
"separator": "__ (double underscore between version and description)",
|
|
50
|
+
"case": "snake_case",
|
|
51
|
+
"date_component": false,
|
|
52
|
+
"inferred": false
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
"content_conventions": {
|
|
56
|
+
"one_change_per_file": false,
|
|
57
|
+
"note_on_one_change": "Files group related DDL - CREATE TABLE commonly followed by its indexes in the same file. Some files have multiple ALTER TABLE statements.",
|
|
58
|
+
"has_comments": true,
|
|
59
|
+
"comment_style": "header block with -- dashes banner then inline -- comments per section",
|
|
60
|
+
"has_transaction_wrapper": false,
|
|
61
|
+
"uses_if_not_exists": true,
|
|
62
|
+
"index_in_same_file": true,
|
|
63
|
+
"constraint_naming": "chk_{table}_{field} for CHECK; idx_{abbrev_table}_{column} for indexes",
|
|
64
|
+
"column_naming": "snake_case",
|
|
65
|
+
"has_rollback_section": false,
|
|
66
|
+
"content_types_found": ["CREATE TABLE", "ALTER TABLE", "CREATE OR REPLACE VIEW", "CREATE INDEX", "UPDATE", "DELETE", "SELECT (preview block in V39)"],
|
|
67
|
+
"inferred": false
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
"organization": {
|
|
71
|
+
"structure": "flat",
|
|
72
|
+
"ordering_mechanism": "numeric_prefix",
|
|
73
|
+
"subfolders": [],
|
|
74
|
+
"notes": "V39 comment documents: V38 is the highest at time of writing; renumber at merge if another change has claimed V39",
|
|
75
|
+
"inferred": false
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
"current_state": {
|
|
79
|
+
"total_script_count": 39,
|
|
80
|
+
"highest_version_number": 39,
|
|
81
|
+
"version_sequence": "V1-V39, fully contiguous, no gaps",
|
|
82
|
+
"next_suggested": "V40__{description}.sql",
|
|
83
|
+
"most_recent_script": "V39__purge_legacy_device_keyed_ai_inventory.sql",
|
|
84
|
+
"most_recent_path": "src/main/resources/db/migration/V39__purge_legacy_device_keyed_ai_inventory.sql"
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
"docs": {
|
|
88
|
+
"migration_guide_exists": false,
|
|
89
|
+
"migration_guide_path": "",
|
|
90
|
+
"key_rules_from_docs": [
|
|
91
|
+
"Numbering note in V39 comment: verify highest version at time of writing and renumber at merge if claimed",
|
|
92
|
+
"V39 includes a PREVIEW (read-only SELECT) block as pre-check, then DELETE in one transaction"
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
"sfn-iam-api": {
|
|
98
|
+
"repo": "sfn-iam-api",
|
|
99
|
+
"has_migrations": true,
|
|
100
|
+
|
|
101
|
+
"migration_locations": [
|
|
102
|
+
{
|
|
103
|
+
"path": "src/main/resources/db/migration",
|
|
104
|
+
"type": "migration_scripts",
|
|
105
|
+
"file_count": 49,
|
|
106
|
+
"description": "Versioned DDL and seed-data migration scripts for the IAM database. Schema creation, package/feature/scope seeding, data normalization. Flat folder, no subfolders."
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
|
|
110
|
+
"other_sql_locations": [
|
|
111
|
+
{
|
|
112
|
+
"path": "scripts/cleanup-default-group-memberships.sql",
|
|
113
|
+
"type": "one_time_ops_script",
|
|
114
|
+
"description": "Standalone one-time cleanup script. Deletes stale default-group membership rows. Detailed header comment. NOT in the migration folder."
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
|
|
118
|
+
"naming_convention": {
|
|
119
|
+
"pattern": "V{n}__{snake_case_description}.sql",
|
|
120
|
+
"example": "V1__create_login_audit_event_table.sql",
|
|
121
|
+
"examples_spread": [
|
|
122
|
+
"V1__create_login_audit_event_table.sql",
|
|
123
|
+
"V13__seed_feature_groups.sql",
|
|
124
|
+
"V34__fix_scope_catalog.sql",
|
|
125
|
+
"V38__seed_base_scope_catalog.sql",
|
|
126
|
+
"V57__normalize_user_email_and_username_lowercase.sql"
|
|
127
|
+
],
|
|
128
|
+
"has_version_prefix": true,
|
|
129
|
+
"version_format": "V{integer}__ (capital V, integer, double underscore)",
|
|
130
|
+
"separator": "__ (double underscore between version and description)",
|
|
131
|
+
"case": "snake_case",
|
|
132
|
+
"date_component": false,
|
|
133
|
+
"inferred": false
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
"content_conventions": {
|
|
137
|
+
"one_change_per_file": false,
|
|
138
|
+
"note_on_one_change": "Files range from single ALTER TABLE to large seed blobs (V16 is 35KB, V38 is 62KB). Seed migrations use NOT EXISTS guards for idempotency.",
|
|
139
|
+
"has_comments": true,
|
|
140
|
+
"comment_style": "-- comment header with V# reference and WHY context. Later scripts (V38+) have extensive multi-paragraph problem/fix/safety comment blocks",
|
|
141
|
+
"has_transaction_wrapper": false,
|
|
142
|
+
"uses_if_not_exists": true,
|
|
143
|
+
"index_in_same_file": true,
|
|
144
|
+
"constraint_naming": "not_documented",
|
|
145
|
+
"column_naming": "snake_case",
|
|
146
|
+
"has_rollback_section": false,
|
|
147
|
+
"uses_idempotency_guards": true,
|
|
148
|
+
"note_on_idempotency": "Seed migrations use NOT EXISTS / ON CONFLICT guards. V38 comment: SAFETY (hard constraint) - idempotent + additive",
|
|
149
|
+
"content_types_found": ["CREATE TABLE", "ALTER TABLE", "INSERT (seed data)", "UPDATE (data normalization)", "CREATE INDEX", "CREATE UNIQUE INDEX", "DO $$ ... $$ (plpgsql blocks)"],
|
|
150
|
+
"inferred": false
|
|
151
|
+
},
|
|
152
|
+
|
|
153
|
+
"organization": {
|
|
154
|
+
"structure": "flat",
|
|
155
|
+
"ordering_mechanism": "numeric_prefix",
|
|
156
|
+
"subfolders": [],
|
|
157
|
+
"version_gaps_explanation": "Gaps at V41-V47 and V52 confirmed absent. V48-V51 exist; V53-V57 continue.",
|
|
158
|
+
"version_gaps": [41, 42, 43, 44, 45, 46, 47, 52],
|
|
159
|
+
"inferred": false
|
|
160
|
+
},
|
|
161
|
+
|
|
162
|
+
"current_state": {
|
|
163
|
+
"total_script_count": 49,
|
|
164
|
+
"highest_version_number": 57,
|
|
165
|
+
"version_sequence": "V1-V57 with gaps at V41-V47 and V52 (files absent from repo)",
|
|
166
|
+
"next_suggested": "V58__{description}.sql",
|
|
167
|
+
"most_recent_script": "V57__normalize_user_email_and_username_lowercase.sql",
|
|
168
|
+
"most_recent_path": "src/main/resources/db/migration/V57__normalize_user_email_and_username_lowercase.sql"
|
|
169
|
+
},
|
|
170
|
+
|
|
171
|
+
"docs": {
|
|
172
|
+
"migration_guide_exists": false,
|
|
173
|
+
"migration_guide_path": "",
|
|
174
|
+
"migration_related_docs": [
|
|
175
|
+
{
|
|
176
|
+
"path": "docs/Groups-Claim-Scope-Migration.md",
|
|
177
|
+
"type": "keycloak_config_migration_runbook",
|
|
178
|
+
"note": "NOT a database schema migration. Documents a Keycloak OAuth scope change. Irrelevant to SQL migrations."
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"key_rules_from_docs": []
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
|
|
185
|
+
"sfn-tenants-api": {
|
|
186
|
+
"repo": "sfn-tenants-api",
|
|
187
|
+
"has_migrations": true,
|
|
188
|
+
|
|
189
|
+
"migration_locations": [
|
|
190
|
+
{
|
|
191
|
+
"path": "src/main/resources/db/migration",
|
|
192
|
+
"type": "migration_scripts",
|
|
193
|
+
"file_count": 52,
|
|
194
|
+
"description": "Versioned DDL and seed-data migration scripts for the tenants database. Largest migration set. Includes schema creation, tenant config columns, extension registry, rules engine bundle seeding (21-52KB files), and policy gates."
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
|
|
198
|
+
"other_sql_locations": [
|
|
199
|
+
{
|
|
200
|
+
"path": "local/schema.sql",
|
|
201
|
+
"type": "local_dev_schema_dump",
|
|
202
|
+
"description": "Full pg_dump of tenants DB schema (PostgreSQL 14 to 18). Local dev setup only. NOT a migration. Dated 2026-05-03."
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"path": "local/seed.sql",
|
|
206
|
+
"type": "local_dev_seed_dump",
|
|
207
|
+
"description": "Full pg_dump of catalog/reference data for local dev. NOT a migration. Dated 2026-05-03."
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"path": "local/seed-ai-inventory.sql",
|
|
211
|
+
"type": "local_dev_seed_script",
|
|
212
|
+
"description": "Manual seed script for AI inventory tables (V37 tables). Must be run after V37 migration. Requires manual ID substitution. Has docker exec psql instructions in header."
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"path": "docs/database-schemas.sql",
|
|
216
|
+
"type": "reference_schema_doc",
|
|
217
|
+
"description": "Reference SQL with CREATE TABLE statements. NOT a runnable migration - exists as documentation."
|
|
218
|
+
}
|
|
219
|
+
],
|
|
220
|
+
|
|
221
|
+
"naming_convention": {
|
|
222
|
+
"pattern": "V{n}__{snake_case_description}.sql",
|
|
223
|
+
"example": "V63__tenant_principal_gate.sql",
|
|
224
|
+
"examples_spread": [
|
|
225
|
+
"V1__create_login_audit_event_table.sql",
|
|
226
|
+
"V4__add_tenant_code.sql",
|
|
227
|
+
"V34__browser_policy_schema_updates.sql",
|
|
228
|
+
"V48__create_rules_engine_bundle.sql",
|
|
229
|
+
"V63__tenant_principal_gate.sql"
|
|
230
|
+
],
|
|
231
|
+
"has_version_prefix": true,
|
|
232
|
+
"version_format": "V{integer}__ (capital V, integer, double underscore)",
|
|
233
|
+
"separator": "__ (double underscore between version and description)",
|
|
234
|
+
"case": "snake_case",
|
|
235
|
+
"date_component": "sometimes appended after description for sequential bundle updates",
|
|
236
|
+
"date_component_example": "V53__set_global_default_classify_ai_bundle_20260701.sql - date suffix when same operation repeats on new date",
|
|
237
|
+
"inferred": false
|
|
238
|
+
},
|
|
239
|
+
|
|
240
|
+
"content_conventions": {
|
|
241
|
+
"one_change_per_file": false,
|
|
242
|
+
"note_on_one_change": "Files range from 1-line ALTER (V35: 81 bytes) to 52KB JSON-data seed migrations (V62). Large files contain UPDATE statements with embedded JSON policy bundles.",
|
|
243
|
+
"has_comments": true,
|
|
244
|
+
"comment_style": "Multi-line header block with -- dashes, V# tag, WHY section, Context, ADR references, and explicit NOTE about manual application",
|
|
245
|
+
"has_transaction_wrapper": false,
|
|
246
|
+
"uses_if_not_exists": true,
|
|
247
|
+
"index_in_same_file": true,
|
|
248
|
+
"constraint_naming": "not_documented",
|
|
249
|
+
"column_naming": "snake_case",
|
|
250
|
+
"has_rollback_section": false,
|
|
251
|
+
"content_types_found": ["CREATE TABLE", "ALTER TABLE ADD COLUMN", "ALTER TABLE ALTER COLUMN", "CREATE UNIQUE INDEX", "CREATE INDEX", "INSERT (seed/default data)", "UPDATE (data migrations and policy JSON)", "DO $$ ... $$ (plpgsql blocks)"],
|
|
252
|
+
"inferred": false
|
|
253
|
+
},
|
|
254
|
+
|
|
255
|
+
"organization": {
|
|
256
|
+
"structure": "flat",
|
|
257
|
+
"ordering_mechanism": "numeric_prefix",
|
|
258
|
+
"subfolders": [],
|
|
259
|
+
"version_gaps_explanation": "Gaps at V5-V10 and V36-V40 confirmed absent. V11 resumes after V4; V41 resumes after V35.",
|
|
260
|
+
"version_gaps": [5, 6, 7, 8, 9, 10, 36, 37, 38, 39, 40],
|
|
261
|
+
"inferred": false
|
|
262
|
+
},
|
|
263
|
+
|
|
264
|
+
"current_state": {
|
|
265
|
+
"total_script_count": 52,
|
|
266
|
+
"highest_version_number": 63,
|
|
267
|
+
"version_sequence": "V1-V63 with gaps at V5-V10 and V36-V40",
|
|
268
|
+
"next_suggested": "V64__{description}.sql",
|
|
269
|
+
"most_recent_script": "V63__tenant_principal_gate.sql",
|
|
270
|
+
"most_recent_path": "src/main/resources/db/migration/V63__tenant_principal_gate.sql"
|
|
271
|
+
},
|
|
272
|
+
|
|
273
|
+
"docs": {
|
|
274
|
+
"migration_guide_exists": false,
|
|
275
|
+
"migration_guide_path": "",
|
|
276
|
+
"migration_related_docs": [
|
|
277
|
+
{
|
|
278
|
+
"path": "docs/jwtpull-migration.md",
|
|
279
|
+
"type": "code_refactor_migration_doc",
|
|
280
|
+
"note": "NOT a database schema migration. Documents a code-level refactor. Irrelevant to SQL migrations."
|
|
281
|
+
}
|
|
282
|
+
],
|
|
283
|
+
"key_rules_from_docs": [
|
|
284
|
+
"seed-ai-inventory.sql: migrations are run manually in this project - nothing applies on startup",
|
|
285
|
+
"V63 comment: NOTE: migrations are applied MANUALLY (no Flyway on boot). Run BEFORE deploying Package-1 builds"
|
|
286
|
+
]
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
|
|
290
|
+
"sfn-auth-api": {
|
|
291
|
+
"repo": "sfn-auth-api",
|
|
292
|
+
"has_migrations": false,
|
|
293
|
+
"note": "Spring Boot service. application.properties has datasource config (DB_URL env var) but no migration folder or SQL files found anywhere.",
|
|
294
|
+
"migration_locations": [],
|
|
295
|
+
"other_sql_locations": []
|
|
296
|
+
},
|
|
297
|
+
|
|
298
|
+
"sfn-eureka-api": {
|
|
299
|
+
"repo": "sfn-eureka-api",
|
|
300
|
+
"has_migrations": false,
|
|
301
|
+
"note": "Spring Boot Eureka service discovery server. No database - purely a service registry. No SQL files found.",
|
|
302
|
+
"migration_locations": [],
|
|
303
|
+
"other_sql_locations": []
|
|
304
|
+
},
|
|
305
|
+
|
|
306
|
+
"sfn-gateway-api": {
|
|
307
|
+
"repo": "sfn-gateway-api",
|
|
308
|
+
"has_migrations": false,
|
|
309
|
+
"note": "Spring Cloud Gateway (API gateway). No database - stateless routing layer. No SQL files found.",
|
|
310
|
+
"migration_locations": [],
|
|
311
|
+
"other_sql_locations": []
|
|
312
|
+
},
|
|
313
|
+
|
|
314
|
+
"sfn-policy-api": {
|
|
315
|
+
"repo": "sfn-policy-api",
|
|
316
|
+
"has_migrations": false,
|
|
317
|
+
"note": "Policy service. Resources contain only application.properties and rules engine JSON schema files. No SQL files found.",
|
|
318
|
+
"migration_locations": [],
|
|
319
|
+
"other_sql_locations": []
|
|
320
|
+
},
|
|
321
|
+
|
|
322
|
+
"sfn-web-ui": {
|
|
323
|
+
"repo": "sfn-web-ui",
|
|
324
|
+
"has_migrations": false,
|
|
325
|
+
"note": "React frontend (package.json project). No SQL files found.",
|
|
326
|
+
"migration_locations": [],
|
|
327
|
+
"other_sql_locations": []
|
|
328
|
+
},
|
|
329
|
+
|
|
330
|
+
"snf-browser-extn": {
|
|
331
|
+
"repo": "snf-browser-extn",
|
|
332
|
+
"has_migrations": false,
|
|
333
|
+
"note": "Browser extension Chrome/Edge (package.json project). No SQL files found.",
|
|
334
|
+
"migration_locations": [],
|
|
335
|
+
"other_sql_locations": []
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
|
|
339
|
+
"workspace_level_sql": {
|
|
340
|
+
"sfn-seed-sql": {
|
|
341
|
+
"path": "sfn-seed-sql",
|
|
342
|
+
"type": "repo_placeholder",
|
|
343
|
+
"note": "Directory exists at workspace root with only a blank README.md (Azure DevOps default template, all sections say TODO). No SQL files inside. Purpose is undocumented."
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
|
|
347
|
+
"global_conventions": {
|
|
348
|
+
"consistent_across_services": true,
|
|
349
|
+
"pattern_used_by": ["sfn-events-api", "sfn-iam-api", "sfn-tenants-api"],
|
|
350
|
+
"services_without_migrations": ["sfn-auth-api", "sfn-eureka-api", "sfn-gateway-api", "sfn-policy-api", "sfn-web-ui", "snf-browser-extn"],
|
|
351
|
+
"standard_migration_path": "src/main/resources/db/migration",
|
|
352
|
+
"note_on_path": "All three services use db/migration (SINGULAR). NOT db/migrations (plural). Confirmed by direct directory inspection.",
|
|
353
|
+
"differences_between_services": [
|
|
354
|
+
"sfn-events-api: clean V1-V39, no gaps; includes CREATE VIEW scripts",
|
|
355
|
+
"sfn-iam-api: V1-V57 with gaps (V41-V47, V52 absent); includes large seed migrations for scope/package catalog",
|
|
356
|
+
"sfn-tenants-api: V1-V63 with gaps (V5-V10, V36-V40 absent); largest scripts up to 52KB JSON policy bundles; date suffix variant used for sequential bundle updates",
|
|
357
|
+
"sfn-tenants-api has extra local/ dev SQL and docs/database-schemas.sql reference file",
|
|
358
|
+
"sfn-iam-api has a scripts/ folder for one-time ops SQL outside the migration folder"
|
|
359
|
+
],
|
|
360
|
+
"recommended_pattern": "V{n}__{snake_case_description}.sql - increment from the highest existing V# in the target service",
|
|
361
|
+
"recommended_example": "V64__add_column_to_tenants.sql (for sfn-tenants-api next)",
|
|
362
|
+
"recommended_path": "src/main/resources/db/migration/{filename}.sql"
|
|
363
|
+
},
|
|
364
|
+
|
|
365
|
+
"mcp_guardrails": {
|
|
366
|
+
"check_existence_before_create": true,
|
|
367
|
+
"naming_pattern_to_enforce": "^V\\d+__[a-z][a-z0-9_]*\\.sql$",
|
|
368
|
+
"naming_pattern_description": "Capital V, one or more digits, double underscore, snake_case description starting with lowercase letter, .sql extension",
|
|
369
|
+
"naming_valid_examples": [
|
|
370
|
+
"V40__create_audit_log_table.sql",
|
|
371
|
+
"V58__add_policy_column.sql",
|
|
372
|
+
"V64__tenant_principal_domains.sql"
|
|
373
|
+
],
|
|
374
|
+
"naming_invalid_examples": [
|
|
375
|
+
"v40__create_table.sql (lowercase v)",
|
|
376
|
+
"V40_create_table.sql (single underscore)",
|
|
377
|
+
"V40__CreateTable.sql (camelCase)",
|
|
378
|
+
"V40__create-table.sql (hyphen in description)",
|
|
379
|
+
"40__create_table.sql (no V prefix)",
|
|
380
|
+
"create_table.sql (no version prefix at all)"
|
|
381
|
+
],
|
|
382
|
+
"required_for_entity_change": true,
|
|
383
|
+
"required_for_column_add": true,
|
|
384
|
+
"required_for_index_change": true,
|
|
385
|
+
"required_for_data_migration": true,
|
|
386
|
+
"not_required_for": ["local/seed.sql updates", "docs/database-schemas.sql", "scripts/ one-time ops files"],
|
|
387
|
+
"per_service_next_versions": {
|
|
388
|
+
"sfn-events-api": { "next": "V40", "example": "V40__{description}.sql" },
|
|
389
|
+
"sfn-iam-api": { "next": "V58", "example": "V58__{description}.sql" },
|
|
390
|
+
"sfn-tenants-api": { "next": "V64", "example": "V64__{description}.sql" }
|
|
391
|
+
},
|
|
392
|
+
"gap_warning": "sfn-iam-api gaps: V41-V47, V52. sfn-tenants-api gaps: V5-V10, V36-V40. These are confirmed absent from repo - do NOT reuse these numbers.",
|
|
393
|
+
"application_reminder": "NO Flyway on boot. Scripts MUST be run manually against PostgreSQL before or during deployment of code that depends on them."
|
|
394
|
+
}
|
|
395
|
+
}
|