question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Creation of empty Migration

See original GitHub issue

Problem

Prisma Migrate will not allow me to create an empty migration that I can fill with SQL myself. When I want to only execute SQL for information that is not stored in my Prisma Schema, that is a hassle.

Suggested solution

Let me generate empty migrations.

Alternatives

  • Add a fake model to the schema, create the migration with --create-only, remove the fake model again, adapt the migration.sql file, run npx prisma migrate dev

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
tomhoulecommented, Apr 15, 2021

Ugh, why does this happen to me all the time. I’ll try to find the other one again :p

1reaction
janpiocommented, Apr 8, 2021

Yes, equivalent of creating the folder and empty file. Feel free to fix my misleading description above.

Read more comments on GitHub >

github_iconTop Results From Across the Web

EF migration shows empty Up() Down() methods
Infortunately I get an empty migration Up() and Down() method. When I look in the database there is a __migrationHistory available with the...
Read more >
Generating Migrations - Doctrine
Migrations can be created for you if you're using the Doctrine 2 ORM or the DBAL Schema Representation. Empty migration classes can also...
Read more >
ef6 create empty migration . Today I Learned (secretGeek)
You'll receive an "empty" migration file, something like this: copy namespace MyDbProject.Migrations { using System; using System.Data.Entity.Migrations ...
Read more >
Code First Migrations with an existing database - EF6
Option Two: Use empty database as a starting point · Run the Add-Migration InitialCreate command in Package Manager Console. · Comment out all ......
Read more >
Add option to generate empty migration files even ... - GitHub
It's actually already possible with prisma migrate dev --create-only if no change is detected an empty migration file will still be created and ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found