You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do not know yarn and nodejs. So I installed both of them and modules were instralled by after. The issue I'm facing is when I'm running : yarn redwood db seed
it tells me :
PrismaClientUnknownRequestError:
Invalid db.country.create() invocation in
C:\Users\albel\Documents\covid19\api\prisma\seeds.js:64:22
60 }
61
62 async function main() {
63 await asyncForEach(countries, async (country) => {
→ 64 await db.country.create(
Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(SqliteFailure(Error { code: Unknown, extended_code: 1 }, Some("no such table: C:.Country"))) })
at PrismaClientFetcher.request (C:\Users\albel\Documents\covid19\node_modules\@prisma\client\index.js:90:17)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Seeding your database... [completed]
Done in 1.86s.
the schema.prisma looks like this
datasource DS {
provider = "sqlite"
url = "file:dev.db"
}
generator photonjs {
provider = "prisma-client-js"
binaryTargets = ["native", "rhel-openssl-1.0.x"]
}
model Day {
id Int @id @default(autoincrement())
date DateTime @unique
createdAt DateTime @default(now())
counts DailyCount[]
}
model Country {
id Int @id @default(autoincrement())
iso String @unique
worldometersSlug String @unique
name String
createdAt DateTime @default(now())
dailyCounts DailyCount[]
}
model DailyCount {
id Int @id @default(autoincrement())
date Day
country Country
totalCases Int
newCases Int
currentlyInfected Int
totalDeaths Int
newDeaths Int
}
How can I add a new country ?
Any insight on what I doing wrong ?
thanks
The text was updated successfully, but these errors were encountered:
Hi,
I do not know yarn and nodejs. So I installed both of them and modules were instralled by after. The issue I'm facing is when I'm running : yarn redwood db seed
it tells me :
the schema.prisma looks like this
How can I add a new country ?
Any insight on what I doing wrong ?
thanks
The text was updated successfully, but these errors were encountered: