Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): use inferred project root when creating migrations from subdirectory #5905

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

juice49
Copy link
Contributor

@juice49 juice49 commented Mar 5, 2024

Description

When used inside a Studio project subdirectory, the CLI searches parent directories in order to infer the project root. The migration create command doesn't currently respect the inferred root, and will attempt to create/use a migrations directory in the current working directory. This behaviour is incorrect; it's impossible to run migrations located anywhere other than the migrations directory in the project root.

This branch makes migration create command respect the inferred project root.

What to review

Does this fix make sense?

Testing

Attempt to create a migration from a Studio project subdirectory. The migration should always be added to the migrations directory in the project root.

@juice49 juice49 requested a review from a team as a code owner March 5, 2024 10:58
@juice49 juice49 requested review from cngonzalez and removed request for a team March 5, 2024 10:58
Copy link

vercel bot commented Mar 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview Mar 13, 2024 5:03pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 13, 2024 5:03pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Mar 13, 2024 5:03pm

@juice49 juice49 requested review from a team and removed request for a team March 5, 2024 10:59
Copy link
Contributor

github-actions bot commented Mar 5, 2024

No changes to documentation

Copy link
Contributor

github-actions bot commented Mar 5, 2024

Component Testing Report Updated Mar 13, 2024 5:06 PM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 32s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 6s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 12s 3 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 13s 4 2 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 13s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 32s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 59s 15 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 2s 18 0 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 12s 6 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 13s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 20s 9 0 0

@juice49 juice49 force-pushed the fix/create-migrations-from-subdirectory branch from 71dea59 to b5afac4 Compare March 13, 2024 16:58
@juice49 juice49 added this pull request to the merge queue Mar 13, 2024
Merged via the queue into next with commit 1d2775c Mar 13, 2024
36 checks passed
@juice49 juice49 deleted the fix/create-migrations-from-subdirectory branch March 13, 2024 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants