DHDistant Horizons
Created by Amm0 on 3/18/2024 in #help-me
This Pack Doesn't Have DH support
Apologies if this has been answered, but I can't seem to find it after searching for 20 minutes. I downloaded the fork of Complementary Shaders by EminGT (the one that says it has DH compatibility config), but every time I try to apply it in game I get a large red text box that says it won't work with DH. Is there an option somewhere that I can't find where I can turn that on? Any tips would be appreciated, thanks!
16 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
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 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
22 replies
DTDrizzle Team
Created by McLean 25 on 4/5/2023 in #help
Can't find meta/_journal.json file when running migrate
3 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
VVALORANT
Created by derek on 12/16/2023 in #community-help
how do you check what you got banned for?
Help
15 replies
VVALORANT
Created by Twendddy on 12/25/2023 in #community-help
pc freeze when alt tab
Greetings guys my whole pc freezes when i tab out of valorant i can only unfreez when i hard reset my pc. is there any fix? Already reinstalled it once. I only got the problem in valorant
5 replies
PMPUBG MOBILE
Created by Elvio on 4/10/2024 in #questions
NetWing APK
Does Using netwing to Control Your Lag is Cheating?
7 replies
UBUniversal Blue
Created by Rhan121 on 1/22/2024 in #🛟bazzite-help
forgot Root/Sudo password
Hi, I thought it knew my root password clearly not... Is there a way to set it without having to re install the ISO?
14 replies
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 FlyawayNutria69 on 2/8/2024 in #community-help
van -79 error code?
What does this mean please
9 replies
VVALORANT
Created by jdxdsupreme on 2/7/2024 in #community-help
MY game crashes when it gets to the agent select screen or who attacking and who's defending screen
How do I fix it kicks me to lobby and gives no error message
25 replies
RFRSM.GG ~ Freeroam
Created by lucadeck on 9/2/2023 in #📞|support
"Couldn't resolve URL vjarme."
No description
25 replies
VVALORANT
Created by Econ on 2/6/2024 in #community-help
Why can't I import crosshairs :(
No description
21 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
HHomarr
Created by Bon on 2/24/2023 in #💬・get-help
Plex Integration Setup
Is there anything specific that needs to be done in order to connect Homarr to Plex? I'd assume an area to place the Plex instance URL, or some sort of API key field? I've enabled the Plex & Jellyfin widget but it doesn't seem to do anything. Thank you in advance!
67 replies
VVALORANT
Created by Arias on 2/10/2024 in #community-help
VAN-79 help
No description
85 replies
TTCTheo's Typesafe Cult
Created by Romain on 7/9/2023 in #questions
Zod enums vs Native enums
From what I understood from the documentation of Zod, enum should be use as followed :
const FishEnum = z.enum(["Salmon", "Tuna", "Trout"]);
type FishEnum = z.infer<typeof FishEnum>;

// to use it
const someFish = FishEnum.parse("Salmon");
// to validate
const VALUES = ["Salmon", "Tuna", "Trout"] as const;
const FishEnum = z.enum(VALUES);
const FishEnum = z.enum(["Salmon", "Tuna", "Trout"]);
type FishEnum = z.infer<typeof FishEnum>;

// to use it
const someFish = FishEnum.parse("Salmon");
// to validate
const VALUES = ["Salmon", "Tuna", "Trout"] as const;
const FishEnum = z.enum(VALUES);
But it is also possible to use native enums :
export enum Countries {
Maroc = "Maroc",
Tunisie = "Tunisie",
Egypte = "Egypte",
}

// to use it
const someCountry = Countries.Maroc;
// to validate
const country = z.nativeEnum(Countries);
export enum Countries {
Maroc = "Maroc",
Tunisie = "Tunisie",
Egypte = "Egypte",
}

// to use it
const someCountry = Countries.Maroc;
// to validate
const country = z.nativeEnum(Countries);
Using native enums seems more easy so, why would I use zod enums ? Have I missed something ?
6 replies
DHDistant Horizons
Created by TANOFACA on 3/26/2024 in #help-me
DH in prominence 2
any idea how can i make DH work in prominence 2 modpack? https://www.curseforge.com/minecraft/modpacks/prominence-2-rpg
39 replies
FFilament
Created by GeRaged | Niklas on 8/29/2023 in #❓┊help
Filament\FilamentManager::getUserName(): Return value must be of type string, null returned
Is it possible to edit the user at Filament? I want instead of the name column, the columns firstname and lastname, but then comes the following error. How can I use my own columns without destroying the logic of filament Filament\FilamentManager::getUserName(): Return value must be of type string, null returned
2 replies
VVALORANT
Created by Mevix on 1/26/2024 in #community-help
secure boot verification failure
No description
219 replies
UBUniversal Blue
Created by n_b.s on 4/13/2024 in #🛟bazzite-help
Handheld daemon not working on Bazzite
No description
10 replies
VVALORANT
Created by saleh on 2/8/2024 in #community-help
problem - Windows build 19045 or newer
No description
64 replies
TtRPC
Created by outis99 on 6/16/2023 in #❓-help
Handling errors on the front-end
I'm making a mutation from my front-end and I intentionally throw a new TRPCError on my backend, I can see the trpc error on both client and server console but I don't understand how to catch it in the front-end The mutation onError does nothing, myMutation.isError is false, myMutation.error is null and status "idle" Here's some example code
const sendMessage = api.chatgpt.sendMessage.useMutation({
onError: (error) => {
console.log("error hit", error); //Doesn't execute
setLoadingResponse(false);
},
});
const sendMessage = api.chatgpt.sendMessage.useMutation({
onError: (error) => {
console.log("error hit", error); //Doesn't execute
setLoadingResponse(false);
},
});
And then on my code
sendMessage.mutate({ message: inputRef.current.value, chatId });
sendMessage.mutate({ message: inputRef.current.value, chatId });
How I throw the error
if (result.status === 200) { //Yes 200 is on purpose so I can test it
throw new TRPCError({
code: "INTERNAL_SERVER_ERROR",
message: "OpenAI API Error",
});
}
if (result.status === 200) { //Yes 200 is on purpose so I can test it
throw new TRPCError({
code: "INTERNAL_SERVER_ERROR",
message: "OpenAI API Error",
});
}
I also tried this
try {
sendMessage.mutate({ message: inputRef.current.value, chatId });
} catch (cause) {
if (isTRPCClientError(cause)) {
// `cause` is now typed as your router's `TRPCClientError`
// Nothing gets printed
console.log('data', cause.data);

}
}
try {
sendMessage.mutate({ message: inputRef.current.value, chatId });
} catch (cause) {
if (isTRPCClientError(cause)) {
// `cause` is now typed as your router's `TRPCClientError`
// Nothing gets printed
console.log('data', cause.data);

}
}
Pretty sure I'm just missing something here so a little help would be appreciated, thank you!
16 replies