spacedrive
spacedrive copied to clipboard
Use PCR for migrations
Using our own migration engine is cringe. Since we're using Prisma we can use their migration engine which is much more reliable and cool. Using a prerelease of PCR 0.6.2 we can use the migration engine to alleviate a lot of our migration issues, but it will require some different approaches for developing migrations and changing the schema:
- In development, migrations do not need to be generated. The equivalent of
prisma db pushwill be ran on launch to synchronise the database and the Prisma schema. Sometimes this may require resetting the database, which can be done by changing thefalsein_db_pushtotrueincore/src/utils/db.rs. Once schema changes are finalized, migrations should be generated withcargo prisma migrate devas usual. - In production, the equivalent of
prisma migrate deploywill be ran and the migrations will be loaded onto the user's machine. This is a non-destructive operation and will simply apply the migrations we have already created and (hopefully) tested.
Should close #173
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated |
|---|---|---|---|
| spacedrive-landing | ✅ Ready (Inspect) | Visit Preview | Sep 21, 2022 at 2:02PM (UTC) |
| spacedrive-web | ✅ Ready (Inspect) | Visit Preview | Sep 21, 2022 at 2:02PM (UTC) |