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

feat(cli): create prisma migrate new command #24239

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

gutyerrez
Copy link
Contributor

This PR add prisma migrate new command.

It will give a another way to create migrations not directly related to schema. Giving a new way on changing something on database and storing that on the code repository.

At this moment i've not found an issue related to this PR

@gutyerrez gutyerrez changed the title feat(cli): migrate new command feat(cli): create prisma migrate new command May 18, 2024
Copy link

codspeed-hq bot commented May 18, 2024

CodSpeed Performance Report

Merging #24239 will not alter performance

Comparing gutyerrez:feat/migrate-new-command (aa6b379) with main (02deb42)

Summary

✅ 3 untouched benchmarks

@gutyerrez gutyerrez marked this pull request as ready for review May 19, 2024 08:34
@gutyerrez gutyerrez requested a review from a team as a code owner May 19, 2024 08:34
@gutyerrez gutyerrez requested review from SevInf and removed request for a team May 19, 2024 08:34
@apolanc apolanc added the PR: Feature A PR That introduces a new feature label May 21, 2024
@gutyerrez
Copy link
Contributor Author

Note: need to fix errors because another changes was made on migrate. i'll fix it

@gutyerrez gutyerrez marked this pull request as draft June 6, 2024 00:06
debug({ createMigrationResult })

process.stdout.write(
`\nThe following migration have been created:\n\n${printMigrationId(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`\nThe following migration have been created:\n\n${printMigrationId(
`\nThe following migration has been created:\n\n${printMigrationId(

})

describe('common', () => {
it('invalid schema', async () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this actually happen if you just want to create an empty SQL migration file independent from your Prisma Schema?

spy.mockRestore()
})

it('should fail if no schema file', async () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the schema file really required?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Feature A PR That introduces a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants