Comments (3)
网上说用这个指令:
npx prisma db push --preview-feature
from umi-blog-example.
可以再搞一个 数据库作为shadowDatabase,也把链接配置在 .env文件里,同时schema.prisma文件配置如下
generator client {
provider = "prisma-client-js"
previewFeatures = ["referentialIntegrity"]
}
datasource db {
provider = "mysql"
referentialIntegrity = "prisma"
url = env("DATABASE_URL")
shadowDatabaseUrl = env("SHADOW_DATABASE_URL")
}
from umi-blog-example.
schema.prisma文件的配置有问题,可能是由于prisma升级的原因,用下面这个:
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "mysql"
relationMode = "prisma"
url = env("DATABASE_URL")
}
...
然后执行命令:
npx prisma db push
就可以了
from umi-blog-example.
Related Issues (14)
- 能否提供数据库呢方便搭建 HOT 13
- 示例博客首页无法加载? HOT 9
- @/utils/jwt 包未找到 HOT 2
- 新版本加入了REDIS,如何在这项目设置,还有JWT_SECRET HOT 3
- api请求报错了,日志从哪看? HOT 2
- Error: Unable to find environment variable: `UPSTASH_REDIS_REST_URL` HOT 1
- ReferenceError: fetch is not defined HOT 6
- Vercel部署完不能访问
- 建议教程在“用户注册”前,添加对“@”的配置这一步 HOT 1
- Serverless Functions不成功 HOT 2
- [Question] 目前就一个 Blog 的教程,能否提供更详细的文档呢? HOT 1
- Serverless Function 如何部署到其他服务器上呢
- 怎么改请求里的response headers里的contentType为application/json
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 umi-blog-example.