{"id":"59db6149-499c-44c0-8efe-c5b269b62e00","shortId":"Ej7KuU","kind":"skill","title":"313-frameworks-spring-db-migrations-flyway","tagline":"Use when you need to add or review Flyway database migrations in a Spring Boot application — Maven dependencies, db/migration scripts, spring.flyway.* configuration, baseline and validation, and alignment with JDBC or Spring Data JDBC. This should trigger for requests such as Add","description":"# Spring — Database migrations (Flyway)\n\nApply Flyway migration guidelines for Spring Boot.\n\n**What is covered in this Skill?**\n\n- flyway-core and database-specific Flyway modules (e.g. PostgreSQL) with Spring Boot BOM\n- Versioned SQL under `src/main/resources/db/migration` (`V{version}__{description}.sql`)\n- `spring.flyway.*` properties: locations, baseline-on-migrate, validate-on-migrate\n- Optional Java migrations (`BaseJavaMigration`) for data backfills\n- Forward-only discipline: do not rewrite applied migrations in shared environments\n- Coordination with `@311-frameworks-spring-jdbc` and `@312-frameworks-spring-data-jdbc`\n\n**Scope:** Apply recommendations based on the reference rules and good/bad examples.\n\n## Constraints\n\nBefore applying Flyway or SQL changes, ensure the project compiles. After improvements, run full verification.\n\n- **MANDATORY**: Run `./mvnw compile` or `mvn compile` before applying any change\n- **SAFETY**: If compilation fails, stop immediately\n- **VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` after applying improvements\n- **BEFORE APPLYING**: Read the reference for detailed rules and good/bad patterns\n- **EDGE CASE**: If the user goal is ambiguous, stop and ask a clarifying question before editing files or running project-wide commands\n- **EDGE CASE**: If required context, files, credentials, or tools are missing, report the blocker explicitly and ask whether to proceed with setup or fallback guidance\n- **EDGE CASE**: If requested changes conflict with project constraints or safety boundaries, explain the conflict and ask for user confirmation on the preferred trade-off\n\n## When to use this skill\n\n- Add or review Flyway migrations in a Spring Boot project\n- Configure spring.flyway or db/migration layout\n\n## Workflow\n\n1. **Read reference and assess project context**\n\nRead `references/313-frameworks-spring-db-migrations-flyway.md` and inspect the current project setup before proposing changes.\n\n2. **Gather scope and decide target improvements**\n\nIdentify requested outcomes, constraints, and the minimum safe set of changes to apply.\n\n3. **Apply framework-aligned changes**\n\nImplement or refactor configuration/code following the reference patterns and project conventions.\n\n4. **Run verification and report results**\n\nExecute appropriate build/tests and summarize what changed, what was verified, and any follow-up actions.\n\n## Reference\n\nFor detailed guidance, examples, and constraints, see [references/313-frameworks-spring-db-migrations-flyway.md](references/313-frameworks-spring-db-migrations-flyway.md).","tags":["313","frameworks","spring","migrations","flyway","cursor","rules","java","jabrena","agent-skills","ai-skills","claude"],"capabilities":["skill","source-jabrena","skill-313-frameworks-spring-db-migrations-flyway","topic-agent-skills","topic-ai-skills","topic-claude","topic-claude-code","topic-claude-code-skills","topic-claude-code-subagents","topic-claude-skills","topic-cursor-agent","topic-cursor-ai","topic-cursor-skills","topic-cursorai","topic-github-copilot"],"categories":["cursor-rules-java"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/jabrena/cursor-rules-java/313-frameworks-spring-db-migrations-flyway","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add jabrena/cursor-rules-java","source_repo":"https://github.com/jabrena/cursor-rules-java","install_from":"skills.sh"}},"qualityScore":"0.631","qualityRationale":"deterministic score 0.63 from registry signals: · indexed on github topic:agent-skills · 362 github stars · SKILL.md body (2,581 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-26T12:53:37.282Z","embedding":null,"createdAt":"2026-04-18T22:02:14.880Z","updatedAt":"2026-04-26T12:53:37.282Z","lastSeenAt":"2026-04-26T12:53:37.282Z","tsv":"'/mvnw':162,179 '1':295 '2':313 '3':333 '311':121 '312':127 '313':1 '4':350 'action':371 'add':13,48,279 'align':34,337 'ambigu':207 'appli':53,114,134,146,168,187,190,332,334 'applic':23 'appropri':357 'ask':210,239,264 'assess':299 'backfil':106 'base':136 'basejavamigr':103 'baselin':30,93 'baseline-on-migr':92 'blocker':236 'bom':80 'boot':22,59,79,287 'boundari':259 'build/tests':358 'case':201,224,249 'chang':150,170,252,312,330,338,362 'clarifi':212 'clean':180,184 'command':222 'compil':154,163,166,173 'configur':29,289 'configuration/code':342 'confirm':267 'conflict':253,262 'constraint':144,256,323,378 'context':227,301 'convent':349 'coordin':119 'core':68 'cover':62 'credenti':229 'current':307 'data':39,105,131 'databas':17,50,71 'database-specif':70 'db':5 'db/migration':26,292 'decid':317 'depend':25 'descript':87 'detail':195,374 'disciplin':110 'e.g':75 'edg':200,223,248 'edit':215 'ensur':151 'environ':118 'exampl':143,376 'execut':356 'explain':260 'explicit':237 'fail':174 'fallback':246 'file':216,228 'flyway':7,16,52,54,67,73,147,282 'flyway-cor':66 'follow':343,369 'follow-up':368 'forward':108 'forward-on':107 'framework':3,123,129,336 'framework-align':335 'frameworks-spring-data-jdbc':128 'frameworks-spring-db-migrations-flyway':2 'frameworks-spring-jdbc':122 'full':158 'gather':314 'goal':205 'good/bad':142,198 'guidanc':247,375 'guidelin':56 'identifi':320 'immedi':176 'implement':339 'improv':156,188,319 'inspect':305 'java':101 'jdbc':36,40,125,132 'layout':293 'locat':91 'mandatori':160 'maven':24 'migrat':6,18,51,55,95,99,102,115,283 'minimum':326 'miss':233 'modul':74 'mvn':165,183 'need':11 'option':100 'outcom':322 'pattern':199,346 'postgresql':76 'prefer':270 'proceed':242 'project':153,220,255,288,300,308,348 'project-wid':219 'properti':90 'propos':311 'question':213 'read':191,296,302 'recommend':135 'refactor':341 'refer':139,193,297,345,372 'references/313-frameworks-spring-db-migrations-flyway.md':303,380,381 'report':234,354 'request':45,251,321 'requir':226 'result':355 'review':15,281 'rewrit':113 'rule':140,196 'run':157,161,178,218,351 'safe':327 'safeti':171,258 'scope':133,315 'script':27 'see':379 'set':328 'setup':244,309 'share':117 'skill':65,278 'skill-313-frameworks-spring-db-migrations-flyway' 'source-jabrena' 'specif':72 'spring':4,21,38,49,58,78,124,130,286 'spring.flyway':28,89,290 'sql':82,88,149 'src/main/resources/db/migration':84 'stop':175,208 'summar':360 'target':318 'tool':231 'topic-agent-skills' 'topic-ai-skills' 'topic-claude' 'topic-claude-code' 'topic-claude-code-skills' 'topic-claude-code-subagents' 'topic-claude-skills' 'topic-cursor-agent' 'topic-cursor-ai' 'topic-cursor-skills' 'topic-cursorai' 'topic-github-copilot' 'trade':272 'trade-off':271 'trigger':43 'use':8,276 'user':204,266 'v':85 'valid':32,97 'validate-on-migr':96 'verif':159,352 'verifi':177,181,185,365 'version':81,86 'whether':240 'wide':221 'workflow':294","prices":[{"id":"6adbcc75-e02a-49cb-8cd6-2cc56fa0662d","listingId":"59db6149-499c-44c0-8efe-c5b269b62e00","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"jabrena","category":"cursor-rules-java","install_from":"skills.sh"},"createdAt":"2026-04-18T22:02:14.880Z"}],"sources":[{"listingId":"59db6149-499c-44c0-8efe-c5b269b62e00","source":"github","sourceId":"jabrena/cursor-rules-java/313-frameworks-spring-db-migrations-flyway","sourceUrl":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/313-frameworks-spring-db-migrations-flyway","isPrimary":false,"firstSeenAt":"2026-04-18T22:02:14.880Z","lastSeenAt":"2026-04-26T12:53:37.282Z"}],"details":{"listingId":"59db6149-499c-44c0-8efe-c5b269b62e00","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"jabrena","slug":"313-frameworks-spring-db-migrations-flyway","github":{"repo":"jabrena/cursor-rules-java","stars":362,"topics":["agent-skills","ai-skills","claude","claude-code","claude-code-skills","claude-code-subagents","claude-skills","cursor-agent","cursor-ai","cursor-skills","cursorai","github-copilot","intellij-idea","java","prompting","system-prompts"],"license":"apache-2.0","html_url":"https://github.com/jabrena/cursor-rules-java","pushed_at":"2026-04-26T12:50:01Z","description":"A curated and opinionated collection of Skills and Agents to be used in modern SDLC workflows for Java Enterprise development with your favorite AI Agent harness.","skill_md_sha":"69c48907e8bc632d47d1ebf8830a3656a6594247","skill_md_path":"skills/313-frameworks-spring-db-migrations-flyway/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/313-frameworks-spring-db-migrations-flyway"},"layout":"multi","source":"github","category":"cursor-rules-java","frontmatter":{"name":"313-frameworks-spring-db-migrations-flyway","license":"Apache-2.0","description":"Use when you need to add or review Flyway database migrations in a Spring Boot application — Maven dependencies, db/migration scripts, spring.flyway.* configuration, baseline and validation, and alignment with JDBC or Spring Data JDBC. This should trigger for requests such as Add or review Flyway migrations in a Spring Boot project; Configure spring.flyway or db/migration layout. Part of cursor-rules-java project"},"skills_sh_url":"https://skills.sh/jabrena/cursor-rules-java/313-frameworks-spring-db-migrations-flyway"},"updatedAt":"2026-04-26T12:53:37.282Z"}}