KJReactor
08/10/2021, 1:56 PMKJReactor
08/10/2021, 1:57 PMNditah Samweld
08/10/2021, 3:46 PMdhatGuy
08/10/2021, 4:49 PMThe table `public.Profile` does not exist in the current database.
Error: The table `public.Profile` does not exist in the current database.
The table ought to be public.profile
Duane Creates
08/10/2021, 5:26 PMChip Clark
08/10/2021, 6:22 PMSELECT contcomp.ContactCompanyID, contcomp.CompanyName, contcomp.CompanyWebSite, contact.ContactCompanyID AS Expr1, contact.ContactID, contact.LastName, contact.FirstName, contact.MiddleName,
contact.PreferredFirstName, contact.DisplayName, contact.InterActionID, contact.EmailAddress, contact.Prefix, contact.Suffix, contact.JobTitle
FROM dbo.ContactCompany AS contcomp INNER JOIN
dbo.Contact AS contact ON contcomp.ContactCompanyID = contact.ContactCompanyID
and I'm trying to convert to a prisma.queryRaw
let rawView = 'SELECT contcomp.ContactCompanyID, contcomp.CompanyName, contcomp.CompanyWebSite, ' +
'dbo.Contact.ContactCompanyID AS Expr1, dbo.Contact.ContactID, dbo.Contact.LastName, ' +
'dbo.Contact.FirstName, dbo.Contact.MiddleName, dbo.Contact.PreferredFirstName, ' +
'dbo.Contact.DisplayName, dbo.Contact.InterActionID, dbo.Contact.EmailAddress, ' +
'dbo.Contact.Prefix, dbo.Contact.Suffix, dbo.Contact.JobTitle ' +
'FROM dbo.ContactCompany AS contcomp ' +
'(${Prisma.join(dbo.Contact)}) ON contcomp.ContactCompanyID = contact.ContactCompanyID ';
I get Invalid prisma.queryRaw: Incorrect syntax near '$'.
Looking at the document here: https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#tagged-template-helpersRichard Dunlap
08/10/2021, 6:41 PMnpx prisma migrate dev
, I get an error:
Database error code: 1118
Database error:
Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead,
check the manual. You have to change some columns to TEXT or BLOBs
Please check the query number 235 from the migration file.
I'm not sure why this would be in issue since the schema was generated from prisma's introspection command.
Even worse. I don't know how to find query number 235
since they aren't numbered in the migration's .sql
file. Can anyone point me in the right direction?
ThanksAdeel Ahmad
08/10/2021, 7:00 PMDev__
08/10/2021, 7:34 PMawait this.prisma.$transaction(async prisma => {
Irakli Safareli
08/11/2021, 9:29 AMprisma generate
in docker node:16.5.0-alpine
is throwing Error: Unknown binaryTarget linux-arm-openssl-undefined and no custom binaries were provided
. (prisma@2.29.0).
SOLUTION: https://web.archive.org/web/20210527154633/https://blog.jaimyn.dev/how-to-build-multi-architecture-docker-images-on-an-m1-mac/Muzammil
08/11/2021, 11:22 AMCarlos Gomez
08/11/2021, 8:40 PMprisma db seed
in a Docker container with seed.ts
. ts-node
is unable to resolve paths. Any ideas?
P> prisma db seed --preview-feature
Prisma schema loaded from prisma/schema.prisma
Running seed: ts-node --project ./tsconfig.json -T "prisma/seed.ts" ...
Error: Cannot find module 'src/prisma.client'
Require stack:
- /app/prisma/seed.ts
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:927:15)
at Function.Module._resolveFilename (/app/node_modules/tsconfig-paths/lib/register.js:75:40)
at Function.Module._load (node:internal/modules/cjs/loader:772:27)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:93:18)
at Object.<anonymous> (/app/prisma/seed.ts:1:1)
at Module._compile (node:internal/modules/cjs/loader:1095:14)
at Module.m._compile (/app/node_modules/ts-node/src/index.ts:1295:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
at Object.require.extensions.<computed> [as .ts] (/app/node_modules/ts-node/src/index.ts:1298:12)
Error: Command failed with exit code 1: ts-node --project ./tsconfig.json -T "prisma/seed.ts"
Melvin Gaye
08/11/2021, 11:43 PMLeo Li
08/12/2021, 12:53 AMA
and B
. Is there a way to name it meaningful? Or I have to construct it explicitly?Vladi Stevanovic
Gelo
08/12/2021, 9:48 AMDev__
08/12/2021, 1:18 PMPrisma.Decimal
to a float? whenever I return it always sends it as a stringegor guscha
08/12/2021, 2:23 PMGelo
08/12/2021, 2:48 PMstephan levi
08/12/2021, 2:59 PMJames
08/12/2021, 5:20 PMSELECT
p.*, ROUND(AVG(rt.rating), 1) AS user_rating
FROM
posts AS p
LEFT JOIN
ratings AS rt ON rt.entry_id = p.id
GROUP BY p.id;
I found the docs for aggregations & counts, but it doesn't seem to do what I need (I think). Do I need to create a new model to accomplish joins / selects from other tables?
I did post on stack overflow earlier if slightly more context would help. Also, if there is a more appropriate place to ask newbie questions in please let me know 🙂Maotora
08/12/2021, 7:46 PMpsql -h localhost -p 5432 -U postgres -d dbname
Works perfectly fine but;
`psql "postgresql://postgres:Password$2021@localhost:5432/dbname"``
Gives error psql: error: FATAL: password authentication failed for user "postgres"
Maotora
08/12/2021, 7:49 PMGelo
08/12/2021, 11:33 PMGelo
08/12/2021, 11:51 PMAlan
08/13/2021, 2:57 AMDATABASE_URL
in a file? (instead of .env
)?Dev__
08/13/2021, 2:38 PMArgument of type '() => Promise<Integration[]>' is not assignable to parameter of type 'PrismaPromise<any>[]'
const [updatedIntegration] = await this.prisma.$transaction(async () => {
const method = ...
const updatedIntegration = await this.prisma.integration.update({
data: {
name,
username,
password: hashedPassword,
descriptionCharacterLimit,
integrationMethodId: method.id
},
where: {
id: integration.id
}
});
// some more queries...
return [updatedIntegration];
});
Marcelo Pastore
08/13/2021, 7:28 PMKJReactor
08/13/2021, 10:37 PMHalvor
08/14/2021, 9:12 AM