Cleyde Andrade
07/26/2021, 1:16 PMHalvor
07/26/2021, 4:18 PMHalvor
07/26/2021, 4:18 PMprisma.user.count({
where: {
have a 1-to-1 relation with "activation" table.
}
});
Jakob Clausen
07/26/2021, 5:27 PMJakob Clausen
07/26/2021, 5:27 PMJakob Clausen
07/26/2021, 5:29 PMuser
07/26/2021, 7:05 PMJeremy Scott
07/26/2021, 7:23 PMJeremy Scott
07/26/2021, 7:24 PMjasci
07/26/2021, 9:44 PMBrian Woodward
07/26/2021, 10:39 PMECONNREFUSED
error from the prisma client when I deploy my app:
Error: connect ECONNREFUSED 127.0.0.1:33941\n at cb (/home/app/function/src/generated/prisma/client/runtime/index.js:34800:17)
Halvor
07/27/2021, 12:36 AMWlad Paiva
07/27/2021, 12:50 AMset
to save the changes between two implict many-to-many relationship and it was working great but as soon as I changed it to explicit which will basically save the order between the other two models, it stop worked.
model ModifiersOnItem {
item MenuItem @relation(fields: [itemId], references: [id])
itemId String
group MenuModifierGroup @relation(fields: [groupId], references: [id])
groupId String
order Int
@@id([itemId, groupId])
}
The set
doesn’t reflect the same functionality which is ok but now I’m wondering what would be the best approach for this scenario? Where do I have to update the relation between them and the order?
Should I delete all records and add new set again?
Something like this, would be cool to have:
const item = await prisma.menuItem.update({
where: {
id: params.id,
},
data: {
...data,
modifiers: {
set: [
{
// groupId: '',
// order: ''
},
],
},
},
})
Laurence Davies
07/27/2021, 6:52 AMalisalimli
07/27/2021, 8:18 AMPaul
07/27/2021, 11:37 AMNaotho Machida
07/27/2021, 12:23 PMpublicProducts
does not e exist in the current database.`
The table publicProducts is ok in mySQL, the model publicProducts is also created
In my pc, ok... I can GET the data, but in AWS I received this error
How I can solve it? 😢😢alisalimli
07/27/2021, 1:50 PMalisalimli
07/27/2021, 1:51 PMAlex Okros
07/27/2021, 1:57 PMrhel
engines to make it work.David
07/27/2021, 4:23 PMDavid
07/27/2021, 4:23 PMChris Tsongas
07/27/2021, 4:46 PMid String @id @db.Uuid
as I like having the option to generate IDs programmatically (even on the client) before doing an insert, however I'm considering switching to id String @id @default(uuid()) @db.Uuid
so I don't HAVE to supply an ID every time I do an insert. Just want to confirm I'd still be able to supply an ID generated programmatically when doing an insert?Chris Tsongas
07/27/2021, 4:59 PMGiorgio Delgado
07/27/2021, 6:37 PMprisma
CLI? Specifically I am looking to run npx prisma migrate deploy
but programmaticallyGiorgio Delgado
07/27/2021, 6:38 PMDATABASE_URL
for that programGiorgio Delgado
07/27/2021, 6:41 PMvar shell = require('shelljs');
shell.exec(`DATABASE_URL=${BASE_DB_URL}/${autogeneratedSchemaName} npx prisma migrate deploy`);
Giorgio Delgado
07/27/2021, 7:14 PMPrismaClient
running? Each instance would connect to a different databaseAgustín T
07/27/2021, 7:23 PMNeo Lambada
07/27/2021, 7:55 PMconst magicFeedData = await models.sequelize.query(`
select p.*,
${ user ? `exists(select 1 from SavedProduct sp where sp.productId = p.id and sp.userId = ${user.id} and sp.status = '1' limit 1) as "isBookmarked",`: ''}
(select json_object(
'id', s.id,
'name', s.name,
'picture', s.picture,
'avatar', s.avatar,
'website', s.website,
'contact', s.contact,
'isVerified', s.isVerified,
'createdAt', s.createdAt,
'updatedAt', s.updatedAt)
from Shop s
where s.id = p.shopId) as shop
from Product p
where p.stock >= 1
order by p.id DESC ${limit_sql}
`);