Comments (2)
I am also struggling with this issue. Would love to see some improvements in the documentation around this area!
from keystone.
I know you can use prisma's seeding feature to inject database entries. Maybe we're supposed to put all our dev data in a seed file? If so it would be good to have the docs mention that.
It might still be an issue for projects where you need to constantly be changing data during development and testing. Same for projects that involve file/image uploads since I'm not sure how you'd put those in a seed file.
I've been reading through the docs, and the only other way I can see to do migrations is to change your dev script to keystone dev --no-db-push
, which doesn't make any database changes, so you have to manually run keystone prisma migrate dev
each time you change the schema.
I also tried to figure out a way to get back to a working state after using the default push behavior, without deleting all the dev data.
You can use:
keystone prisma migrate diff --from-migrations migrations --to-schema-datasource schema.prisma --script --shadow-database-url='[SHADOW_DATABASE_URL]' > migrations/[migration_number_and_name]/migration.sql
To create the missing migration.
Then run keystone prisma migrate resolve --applied [migration_number_and_name]
, to tell the database that the missing migration has already been applied.
After that the database should be fully up to date with the migrations, and you can switch over to using the --no-db-push
manual migration mode.
Not sure if that's how it's intended to be done, but those are my workarounds so far.
from keystone.
Related Issues (20)
- Keystone6 error: Field must have a selection of subfields HOT 2
- Node 20 (LTS) support HOT 7
- Keystone app breaks with interal slice call on getGqlNames HOT 21
- Calling GraphQL api consume multiple connections HOT 2
- POST body missing, invalid Content-Type, or JSON object has no keys. HOT 2
- Custom Apollo landingspage setup in config.graphql.apolloConfig gives error
- EPERM: operation not permitted, unlink query_engine-windows.dll.nod HOT 2
- WhereInput filter for multiselect field HOT 1
- Hooks not fired on relation field changes HOT 2
- Everything is nullable in the schema HOT 1
- Build Keystone inside turborepo fails HOT 4
- Unable to deploy Keystone JS app to Azure app service HOT 1
- Encountering Connection Timeout Issue in Docker Container on Server Without Internet Access
- Unable to use Component Blocks in Keystone 6. Getting ERR_PACKAGE_PATH_NOT_EXPORTED error HOT 4
- Local assets example throws an error on image upload
- Cannot find module 'fp-ts/lib/Either' HOT 6
- [railway-deployment]: The table `public.User` does not exist in the current database.
- Keystone Prisma CLI does not work with Node v22.1.0 HOT 2
- Unable to use new `validate.{create|update|delete}` field-level hooks with most built-in fields HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keystone.