DTDrizzle Team
Created by Louistiti on 7/18/2023 in #help
Clear the whole database?
For my test environment I'd like to clear the whole db.. is there a way to achieve this using drizzle ?
59 replies
VVALORANT
Created by Kurdo on 6/29/2024 in #community-help
Riot Vanguard wont install on my pc
Idk why but vanguard wont install on my pc. i tried reinstalling val and riot but it wont help
7 replies
VVALORANT
Created by 0neTown on 11/27/2023 in #crosshairs
No crosshair
0;s;1;P;o;1;m;1;0t;10;0l;0;0o;0;0a;1;0f;0;1b;0;S;d;0;b;1
25 replies
PMPUBG MOBILE
Created by S U N YT on 9/22/2024 in #questions
about the ultimate royal timing
No description
7 replies
DTDrizzle Team
Created by kinsyu on 12/1/2023 in #help
There's not enough information to infer relation
I am trying to use drizzle studio but I'm running into the following issue, There is not enough information to infer relation "__public__.collectionsTable.tokens". Here's a simplified version of the schema.
export const tokensTable = mysqlTable(
'tokens',
{
tokenId: varchar('token_id', { length: 255 }).notNull(),

metadataName: varchar('metadata_name', { length: 255 }),
metadataDescription: text('metadata_description'),
collectionId: varbinary('collection_id', {
length: 42,
}).notNull(),

createdAt: timestamp('created_at', {
mode: 'string',
}).defaultNow(),
updatedAt: timestamp('updated_at', {
mode: 'string',
}).defaultNow(),
}
)

export type Token = InferSelectModel<typeof tokensTable>
export type TokenInsert = InferInsertModel<typeof tokensTable>

export const tokensRelations = relations(tokensTable, ({ one }) => ({
collection: one(collectionsTable, {
fields: [tokensTable.collectionId],
references: [collectionsTable.id],
}),
}))

export const collectionsTable = mysqlTable(
'collections',
{
id: varbinary('id', {
length: 42,
}).primaryKey(),

name: varchar('name', {
length: 255,
}).notNull(),
description: text('description'),
createdAt: timestamp('created_at', {
mode: 'string',
}).defaultNow(),
updatedAt: timestamp('updated_at', {
mode: 'string',
}).defaultNow(),
}
)

export type Collection = InferSelectModel<typeof collectionsTable>
export type CollectionInsert = InferInsertModel<typeof collectionsTable>

export const collectionsRelations = relations(collectionsTable, ({ one, many }) => ({
tokens: many(tokensTable, {
relationName: 'collectionTokens',
}),
}))
export const tokensTable = mysqlTable(
'tokens',
{
tokenId: varchar('token_id', { length: 255 }).notNull(),

metadataName: varchar('metadata_name', { length: 255 }),
metadataDescription: text('metadata_description'),
collectionId: varbinary('collection_id', {
length: 42,
}).notNull(),

createdAt: timestamp('created_at', {
mode: 'string',
}).defaultNow(),
updatedAt: timestamp('updated_at', {
mode: 'string',
}).defaultNow(),
}
)

export type Token = InferSelectModel<typeof tokensTable>
export type TokenInsert = InferInsertModel<typeof tokensTable>

export const tokensRelations = relations(tokensTable, ({ one }) => ({
collection: one(collectionsTable, {
fields: [tokensTable.collectionId],
references: [collectionsTable.id],
}),
}))

export const collectionsTable = mysqlTable(
'collections',
{
id: varbinary('id', {
length: 42,
}).primaryKey(),

name: varchar('name', {
length: 255,
}).notNull(),
description: text('description'),
createdAt: timestamp('created_at', {
mode: 'string',
}).defaultNow(),
updatedAt: timestamp('updated_at', {
mode: 'string',
}).defaultNow(),
}
)

export type Collection = InferSelectModel<typeof collectionsTable>
export type CollectionInsert = InferInsertModel<typeof collectionsTable>

export const collectionsRelations = relations(collectionsTable, ({ one, many }) => ({
tokens: many(tokensTable, {
relationName: 'collectionTokens',
}),
}))
In short, each collection can have multiple tokens, but each token can belong to only one collection. I haven't had any issues with this schema for around the 6 months that we've been using it, but we wanted to try out drizzle studio and ran into that issue. The database is running on Planetscale, not sure if that's relevant.
3 replies
DHDistant Horizons
Created by SAMJOBUT on 8/20/2024 in #help-me
DH Overloaded
Hello all, I'm getting this message when flying or sometimes just running through the world. Playing on a server (i have admin) but really know close to nothing about all the solutions the message gives. Could anyone please explain in other terms, or step by step how to deal with this, TBH the message is more inconvenient than the actual issue. Message in question: Distant horizons overloaded, too many chunks queued for updating. This may result in holes in your LODs. please move through the world slower, decrease your vanilla render distance, slow down your world pre-generator, or increase the DH CPU load config. Max queue count [500] ([500] per thread) Thanks in advance
25 replies
Mmfad
Created by donowits on 10/5/2024 in #questions-and-advice
Identify jacket
No description
3 replies
VVALORANT
Created by abcdee on 10/28/2024 in #community-help
is Rala ai bannable?
:logo_VCT:
3 replies
VVALORANT
Created by Mevix on 1/26/2024 in #community-help
secure boot verification failure
No description
219 replies
DTDrizzle Team
Created by iqrow on 5/24/2023 in #help
How to delete with cascade?
I'm using postgres with the following schema (reduced to the important parts):
export const worlds = pgTable('worlds', {
id: uuid('id').defaultRandom().primaryKey()
})
export const users_to_worlds = pgTable(
'users_to_worlds',
{
userId: varchar('user_id', { length: 32 })
.references(() => users.id)
.notNull(),
worldId: uuid('world_id')
.references(() => worlds.id)
.notNull(),
},
(table) => {
return {
pk: primaryKey(table.userId, table.worldId),
}
}
)
export const worlds = pgTable('worlds', {
id: uuid('id').defaultRandom().primaryKey()
})
export const users_to_worlds = pgTable(
'users_to_worlds',
{
userId: varchar('user_id', { length: 32 })
.references(() => users.id)
.notNull(),
worldId: uuid('world_id')
.references(() => worlds.id)
.notNull(),
},
(table) => {
return {
pk: primaryKey(table.userId, table.worldId),
}
}
)
And I'm trying to implement an api call to delete a world. Due to the reference to the world in the users_to_worlds I get the error: Error: update or delete on table "worlds" violates foreign key constraint "users_to_worlds_world_id_worlds_id_fk" on table "users_to_worlds" I believe what I want to use is a CASCADE delete where everything referencing a world is deleted when I delete a world. Is this possible through Drizzle? I can't seem to find anything on this.
7 replies
TtRPC
Created by Alex_A on 6/18/2024 in #❓-help
File upload with formdata
I'm trying to upload a pdf file to R2 and save metadata to my postgres database (both through a trpc procedure). I followed the example in https://github.com/trpc/trpc/tree/next/examples/next-formdata but I get the error copied below. I have been stuck on this for hours and don't know what I'm doing wrong. Envrionment: Next.js 14.2.4 / pnpm Any help would be greatly appreciated!
❌ tRPC failed on presentation.create: [
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"userId"
],
"message": "Required"
},
{
"code": "custom",
"message": "Input not instance of File",
"fatal": true,
"path": [
"file"
]
}
]
❌ tRPC failed on presentation.create: [
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"userId"
],
"message": "Required"
},
{
"code": "custom",
"message": "Input not instance of File",
"fatal": true,
"path": [
"file"
]
}
]
My Form code https://github.com/ysqander/trpc_file_upload/blob/main/src/components/FileUploadForm.tsx My procedure: Presentation.create https://github.com/ysqander/trpc_file_upload/blob/main/src/server/api/routers/presentation.ts
5 replies
VVALORANT
Created by DRIX10 on 3/12/2024 in #community-help
BstShm_5.20.10.1003_nxt file showing up after i play valorant
No description
10 replies
VVALORANT
Created by fabob on 2/11/2024 in #crosshairs
Temet crosshair
0;c;1;s;1;P;c;5;o;1;0t;1;0l;5;0v;3;0g;1;0a;1;0f;0;1b;0
3 replies
VVALORANT
Created by DPEASYGAME on 11/18/2024 in #community-help
does rala ai bannable?
No description
8 replies
PPrisma
Created by яσчαℓтℓя on 11/20/2024 in #help-and-questions
TypeError: The "payload" argument must be of type object. Received null
There's an ongoing issue in our codebase where Prisma queries that fail give the error in the title, which isn't the typical error we see in other projects. Our project is using NextJS 15.0.2 and Prisma (with neon serverless adapter) 5.22.0. Here is the client: import { Pool } from "@neondatabase/serverless"; import { PrismaNeon } from "@prisma/adapter-neon"; import { PrismaClient } from "@prisma/client"; const globalForPrisma = global as unknown as { prisma: PrismaClient }; function makeClient() { const neon = new Pool({ connectionString: process.env.DATABASE_URL }); const adapter = new PrismaNeon(neon); return new PrismaClient({ adapter }); } const db = globalForPrisma.prisma || makeClient(); if (process.env.NODE_ENV === "development") { globalForPrisma.prisma = db; } export default db;
18 replies
DTDrizzle Team
Created by fermentfan on 7/30/2023 in #help
Mocking Drizzle instance
Hey there, I am currently trying to find a good way to mock our drizzle instance for our unit test suite, but the nature of the usage of it makes it kinda hard. Is there somebody who is running a code base with a mocked drizzle?
22 replies
CDCloudflare Developers
Created by wakrypt on 10/22/2024 in #general-help
(failed)net::ERR_BLOCKED_BY_ORB
No description
7 replies
VVALORANT
Created by Illuk on 10/9/2024 in #community-help
Random sldh.dat files appears out of nowhere When i launch val
The title and it is cause of valorant i tried reinstalling and all things but it always appears after i launch the game . tried deleting . So, how can i solve this problem ?
10 replies
VVALORANT
Created by rayans on 3/14/2024 in #community-help
BstShm
No description
23 replies
VVALORANT
Created by tom on 6/28/2024 in #community-help
a critical error has occured (FIXED!!!)
please help ive had this issue since yesterday and i tried to look in event viewer but the error thung says the error is in valorant itself or smth idkkkk pls help
42 replies
VVALORANT
Created by Mayou ♱ on 6/5/2024 in #community-help
Vanguard error
No description
2 replies
VVALORANT
Created by derek on 12/16/2023 in #community-help
how do you check what you got banned for?
Help
15 replies
CWCombat Warriors
Created by adibzz on 9/17/2024 in #🛟・community-support
umm.. I just enter into combat warrior and then I got ban for a reason black-cat-red-eye/40
No description
59 replies
DTDrizzle Team
Created by Apostle Tree on 4/17/2024 in #help
Help with this error. "Can't find meta/_journal.json file"
Hi guys! I am new here and recently started learning how ORMs work and started with drizzle. I built my schema and managed to successfully generate a migration file for it. However, I am unable to actually migrate this to the database. I'm getting the following error
> [email protected] db:migrate
> node drizzle/migrate.js

Error during migration: Error: Can't find meta/_journal.json file
at readMigrationFiles (backend\node_modules\drizzle-orm\migrator.cjs:52:11)
at migrate (backend\node_modules\drizzle-orm\neon-http\migrator.cjs:27:61)
at main (backend\drizzle\migrate.js:11:15)
> [email protected] db:migrate
> node drizzle/migrate.js

Error during migration: Error: Can't find meta/_journal.json file
at readMigrationFiles (backend\node_modules\drizzle-orm\migrator.cjs:52:11)
at migrate (backend\node_modules\drizzle-orm\neon-http\migrator.cjs:27:61)
at main (backend\drizzle\migrate.js:11:15)
I have checked my migrate.js file but cannot understand what the problem might be For context, I'm using the neon database server.
22 replies