We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
建立初步數據庫模型
The text was updated successfully, but these errors were encountered:
新分支 setting postgres
安裝Postgres、pgAdmin4 並完成連接
在每個model裡面加入 @@Datasource(“要使用的datasource”), 建立關聯, table name開頭大寫
關聯table 範例:evidences.chain_id > chains.id (多對一)
刪除migrations資料, 重新建立
npx prisma migrate dev --name init
Sorry, something went wrong.
出現錯誤:error: Attribute not known: "@datasource". 查不能這樣設計 要改成@@Schema('xx'), 關聯要另寫一行, datasource要多設計schemas ref1. https://www.prisma.io/docs/orm/reference/prisma-schema-reference#schema ref2. prisma/prisma#1122 範例:
error: Attribute not known: "@datasource".
錯誤原因: 一個schema不能設定兩個data source 之前是用sqlite測試 現在全部要轉到雲端的postgresql
npx prisma db push --schema=./prisma/schema.prisma
npm run start:dev
taking 8 hr
gibbs-shih
Successfully merging a pull request may close this issue.
建立初步數據庫模型
The text was updated successfully, but these errors were encountered: